git: Use PCRE (#2350)
[termux-packages] / ndk-patches / grp.h.patch
1 diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h ./usr/include/grp.h
2 --- /home/fornwall/lib/android-ndk/sysroot/usr/include/grp.h 2017-11-09 09:57:12.000000000 +0100
3 +++ ./usr/include/grp.h 2017-11-15 11:43:43.065533963 +0100
4 @@ -52,18 +52,11 @@
5
6 /* Note: Android has thousands and thousands of ids to iterate through. */
7
8 -#if __ANDROID_API__ >= 26
9 -struct group* getgrent(void) __INTRODUCED_IN(26);
10 -
11 -void setgrent(void) __INTRODUCED_IN(26);
12 -void endgrent(void) __INTRODUCED_IN(26);
13 -#endif /* __ANDROID_API__ >= 26 */
14 -
15 -
16 -#if __ANDROID_API__ >= 24
17 -int getgrgid_r(gid_t __gid, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
18 -int getgrnam_r(const char* __name, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
19 -#endif /* __ANDROID_API__ >= 24 */
20 +static struct group* getgrent(void) { return 0; }
21 +static void setgrent(void) {}
22 +static void endgrent(void) {}
23 +static int getgrgid_r(gid_t gid, struct group * grp, char * buf, size_t buflen, struct group ** result) { *result = 0; return 0; }
24 +static int getgrnam_r(const char * name, struct group * grp, char * buf, size_t buflen, struct group ** result) { *result = 0; return 0; }
25
26 int getgrouplist(const char* __user, gid_t __group, gid_t* __groups, int* __group_count);
27 int initgroups(const char* __user, gid_t __group);