diff --git a/ndk-patches/23c/grp.h.patch b/ndk-patches/23c/grp.h.patch index 5a47373afc..e11c8ff145 100644 --- a/ndk-patches/23c/grp.h.patch +++ b/ndk-patches/23c/grp.h.patch @@ -1,10 +1,11 @@ -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. */ +--- ./usr/include/grp.h.orig 2022-11-09 21:58:45.468821763 +0100 ++++ ./usr/include/grp.h 2022-11-09 22:02:55.124538470 +0100 +@@ -50,21 +50,15 @@ + struct group* getgrgid(gid_t __gid); + struct group* getgrnam(const char* __name); +-/* Note: Android has thousands and thousands of ids to iterate through. */ +- -#if __ANDROID_API__ >= 26 -struct group* getgrent(void) __INTRODUCED_IN(26); - @@ -13,15 +14,15 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h ./usr/includ -#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 */ + #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); +