5 changed files with 71 additions and 76 deletions
@ -1,12 +0,0 @@ |
|||
diff -u -r ../transmission-2.82/third-party/miniupnp/miniwget.c ./third-party/miniupnp/miniwget.c
|
|||
--- ../transmission-2.82/third-party/miniupnp/miniwget.c 2013-08-09 04:47:50.000000000 +0200
|
|||
+++ ./third-party/miniupnp/miniwget.c 2014-02-10 17:08:34.000000000 +0100
|
|||
@@ -42,7 +42,7 @@
|
|||
* during the connect() call */ |
|||
#define MINIUPNPC_IGNORE_EINTR |
|||
#endif /* #else _WIN32 */ |
|||
-#if defined(__sun) || defined(sun)
|
|||
+#if defined(__sun) || defined(sun) || defined __ANDROID__
|
|||
#define MIN(x,y) (((x)<(y))?(x):(y)) |
|||
#endif |
|||
|
@ -1,12 +1,11 @@ |
|||
diff -u -r ../transmission-2.82/libtransmission/utils.c ./libtransmission/utils.c
|
|||
--- ../transmission-2.82/libtransmission/utils.c 2013-08-09 04:45:40.000000000 +0200
|
|||
+++ ./libtransmission/utils.c 2014-01-29 00:08:31.000000000 +0100
|
|||
@@ -1412,7 +1412,7 @@
|
|||
char buf[128]; |
|||
const int max_precision = (int) log10 (1.0 / DBL_EPSILON) - 1; |
|||
tr_snprintf (buf, sizeof (buf), "%.*f", max_precision, x); |
|||
- if ((pt = strstr (buf, localeconv ()->decimal_point)))
|
|||
+ if ((pt = strstr (buf, ".")))
|
|||
pt[precision ? precision+1 : 0] = '\0'; |
|||
return atof (buf); |
|||
} |
|||
--- ./libtransmission/utils.c.orig 2020-05-14 20:22:41.415540431 +0200
|
|||
+++ ./libtransmission/utils.c 2020-05-14 20:23:46.340145553 +0200
|
|||
@@ -1627,7 +1627,7 @@
|
|||
char buf[128]; |
|||
tr_snprintf(buf, sizeof(buf), "%.*f", DBL_DIG, x); |
|||
|
|||
- if ((pt = strstr(buf, localeconv()->decimal_point)) != NULL)
|
|||
+ if ((pt = strstr(buf, ".")) != NULL)
|
|||
{ |
|||
pt[precision != 0 ? precision + 1 : 0] = '\0'; |
|||
} |
|||
|
@ -1,53 +1,45 @@ |
|||
diff -u -r ../transmission-2.82/libtransmission/platform-quota.c ./libtransmission/platform-quota.c
|
|||
--- ../transmission-2.82/libtransmission/platform-quota.c 2013-08-09 04:45:44.000000000 +0200
|
|||
+++ ./libtransmission/platform-quota.c 2014-02-10 17:07:13.000000000 +0100
|
|||
@@ -22,7 +22,7 @@
|
|||
#include <ufs/ufs/quota.h> /* quotactl() */ |
|||
#elif defined (__sun) |
|||
#include <sys/fs/ufs_quota.h> /* quotactl */ |
|||
- #else
|
|||
+ #elif !defined(__ANDROID__)
|
|||
#include <sys/quota.h> /* quotactl() */ |
|||
#endif |
|||
#ifdef HAVE_GETMNTENT |
|||
@@ -71,7 +71,9 @@
|
|||
static const char * |
|||
getdev (const char * path) |
|||
--- ../platform-quota.c.orig 2020-05-14 20:26:21.167021182 +0200
|
|||
+++ ./libtransmission/platform-quota.c 2020-05-14 21:35:02.917361346 +0200
|
|||
@@ -26,7 +26,7 @@
|
|||
#endif |
|||
#elif defined(__sun) |
|||
#include <sys/fs/ufs_quota.h> /* quotactl */ |
|||
-#else
|
|||
+#elif !defined(__ANDROID__)
|
|||
#include <sys/quota.h> /* quotactl() */ |
|||
#endif |
|||
#ifdef HAVE_GETMNTENT |
|||
@@ -77,7 +77,9 @@
|
|||
|
|||
static char const* getdev(char const* path) |
|||
{ |
|||
-#ifdef HAVE_GETMNTENT
|
|||
+#ifdef __ANDROID__
|
|||
+ return NULL;
|
|||
+#elif defined(HAVE_GETMNTENT)
|
|||
|
|||
FILE * fp; |
|||
FILE* fp; |
|||
|
|||
@@ -122,8 +124,9 @@
|
|||
static const char * |
|||
getfstype (const char * device) |
|||
{ |
|||
-
|
|||
-#ifdef HAVE_GETMNTENT
|
|||
+#ifdef __ANDROID__
|
|||
+ return NULL;
|
|||
+#elif defined(HAVE_GETMNTENT)
|
|||
@@ -315,11 +317,12 @@
|
|||
|
|||
FILE * fp; |
|||
#ifdef __sun |
|||
@@ -198,6 +201,9 @@
|
|||
static int64_t |
|||
getquota (const char * device) |
|||
static int64_t getquota(char const* device) |
|||
{ |
|||
-#if defined(__DragonFly__)
|
|||
+#ifdef __ANDROID__
|
|||
+ return -1;
|
|||
+#else
|
|||
struct dqblk dq; |
|||
int64_t limit; |
|||
int64_t freespace; |
|||
@@ -258,6 +264,7 @@
|
|||
#endif |
|||
/* something went wrong */ |
|||
return -1; |
|||
+ return -1;
|
|||
+#elif defined(__DragonFly__)
|
|||
struct ufs_dqblk dq; |
|||
#else |
|||
struct dqblk dq; |
|||
-#endif
|
|||
int64_t limit; |
|||
int64_t freespace; |
|||
int64_t spaceused; |
|||
@@ -389,6 +392,7 @@
|
|||
|
|||
/* something went wrong */ |
|||
return -1; |
|||
+#endif
|
|||
} |
|||
|
|||
#ifdef HAVE_XQM |
|||
#endif |
|||
|
Loading…
Reference in new issue