termux-packages/ndk-patches/grp.h.patch

28 lines
1.4 KiB
Diff
Raw Normal View History

diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h ./usr/include/grp.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h 2017-11-09 09:57:12.000000000 +0100
+++ ./usr/include/grp.h 2017-11-15 11:43:43.065533963 +0100
@@ -52,18 +52,11 @@
/* Note: Android has thousands and thousands of ids to iterate through. */
-#if __ANDROID_API__ >= 26
-struct group* getgrent(void) __INTRODUCED_IN(26);
-
-void setgrent(void) __INTRODUCED_IN(26);
-void endgrent(void) __INTRODUCED_IN(26);
-#endif /* __ANDROID_API__ >= 26 */
-
-
-#if __ANDROID_API__ >= 24
-int getgrgid_r(gid_t __gid, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
-int getgrnam_r(const char* __name, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
-#endif /* __ANDROID_API__ >= 24 */
+static struct group* getgrent(void) { return 0; }
+static void setgrent(void) {}
+static void endgrent(void) {}
+static int getgrgid_r(gid_t gid, struct group * grp, char * buf, size_t buflen, struct group ** result) { *result = 0; return 0; }
+static int getgrnam_r(const char * name, struct group * grp, char * buf, size_t buflen, struct group ** result) { *result = 0; return 0; }
int getgrouplist(const char* __user, gid_t __group, gid_t* __groups, int* __group_count);
int initgroups(const char* __user, gid_t __group);