termux-packages/x11-packages/transmission-gtk/transmission-2.94_libtransmission_platform-quota.c.patch

54 lines
1.1 KiB
Diff

diff -uNr transmission-2.94/libtransmission/platform-quota.c transmission-2.94.mod/libtransmission/platform-quota.c
--- transmission-2.94/libtransmission/platform-quota.c 2018-05-01 20:18:29.000000000 +0300
+++ transmission-2.94.mod/libtransmission/platform-quota.c 2018-10-06 01:38:32.831374787 +0300
@@ -25,7 +25,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
@@ -76,7 +76,9 @@
static const char *
getdev (const char * path)
{
-#ifdef HAVE_GETMNTENT
+#ifdef __ANDROID__
+ return NULL;
+#elif defined(HAVE_GETMNTENT)
FILE * fp;
@@ -127,8 +129,9 @@
static const char *
getfstype (const char * device)
{
-
-#ifdef HAVE_GETMNTENT
+#ifdef __ANDROID__
+ return NULL;
+#elif defined(HAVE_GETMNTENT)
FILE * fp;
#ifdef __sun
@@ -244,6 +247,9 @@
static int64_t
getquota (const char * device)
{
+#ifdef __ANDROID__
+ return -1;
+#else
struct dqblk dq;
int64_t limit;
int64_t freespace;
@@ -304,6 +310,7 @@
#endif
/* something went wrong */
return -1;
+#endif
}
#endif