0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-27 06:18:57 +00:00
termux-packages/ndk-patches/27c/grp.h.patch
2024-11-09 10:24:50 +08:00

29 lines
1.2 KiB
Diff

--- ./usr/include/grp.h.orig
+++ ./usr/include/grp.h
@@ -50,21 +50,15 @@
struct group* _Nullable getgrgid(gid_t __gid);
struct group* _Nullable getgrnam(const char* _Nonnull __name);
-/* Note: Android has thousands and thousands of ids to iterate through. */
-
-#if __ANDROID_API__ >= 26
-struct group* _Nullable 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* __BIONIC_COMPLICATED_NULLNESS __group, char* _Nonnull __buf, size_t __n, struct group* _Nullable * _Nonnull __result) __INTRODUCED_IN(24);
int getgrnam_r(const char* _Nonnull __name, struct group* __BIONIC_COMPLICATED_NULLNESS __group, char* _Nonnull __buf, size_t __n, struct group* _Nullable *_Nonnull __result) __INTRODUCED_IN(24);
#endif /* __ANDROID_API__ >= 24 */
+static struct group* _Nullable getgrent(void) { return 0; }
+static void setgrent(void) {}
+static void endgrent(void) {}
+
int getgrouplist(const char* _Nonnull __user, gid_t __group, gid_t* __BIONIC_COMPLICATED_NULLNESS __groups, int* _Nonnull __group_count);
int initgroups(const char* _Nonnull __user, gid_t __group);