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