Add start of unified headers transition
[termux-packages] / ndk_patches_unified / grp.h.patch
CommitLineData
29bf3001
FF
1diff -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-06-07 01:07:52.000000000 +0200
3+++ ./usr/include/grp.h 2017-06-18 01:40:08.452570901 +0200
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, struct group*, char*, size_t, struct group**) __INTRODUCED_IN(24);
18-int getgrnam_r(const char*, struct group*, char*, size_t, struct group**) __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*, gid_t, gid_t*, int*);
27 int initgroups (const char*, gid_t);