aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-01-06 16:23:18 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2012-01-06 16:23:18 +0100
commit6b64a269766ace40c56826738de446537add37de (patch)
treee0adf6c71ac0f95f0fa973777f59596b868bba4b
parentba6587295053f369d6e2e9b788f42b49e1baced5 (diff)
downloadbusybox-w32-6b64a269766ace40c56826738de446537add37de.tar.gz
busybox-w32-6b64a269766ace40c56826738de446537add37de.tar.bz2
busybox-w32-6b64a269766ace40c56826738de446537add37de.zip
platform.h: define endgrent() and endpwent() as no-ops on Android
Surprisingly, bionic libc seems to lack these functions. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/grp_.h2
-rw-r--r--include/platform.h5
-rw-r--r--include/pwd_.h2
3 files changed, 7 insertions, 2 deletions
diff --git a/include/grp_.h b/include/grp_.h
index 5c24d558a..82ad90492 100644
--- a/include/grp_.h
+++ b/include/grp_.h
@@ -29,7 +29,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
29 * We will use libc-defined structures, but will #define function names 29 * We will use libc-defined structures, but will #define function names
30 * so that function calls are directed to bb_internal_XXX replacements 30 * so that function calls are directed to bb_internal_XXX replacements
31 */ 31 */
32 32#undef endgrent
33#define setgrent bb_internal_setgrent 33#define setgrent bb_internal_setgrent
34#define endgrent bb_internal_endgrent 34#define endgrent bb_internal_endgrent
35#define getgrent bb_internal_getgrent 35#define getgrent bb_internal_getgrent
diff --git a/include/platform.h b/include/platform.h
index d79cc97e5..7451fb757 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -334,6 +334,11 @@ typedef unsigned smalluint;
334# define MAXSYMLINKS SYMLOOP_MAX 334# define MAXSYMLINKS SYMLOOP_MAX
335#endif 335#endif
336 336
337#if defined(ANDROID) || defined(__ANDROID__)
338# define endpwent() ((void)0)
339# define endgrent() ((void)0)
340#endif
341
337 342
338/* ---- Who misses what? ------------------------------------ */ 343/* ---- Who misses what? ------------------------------------ */
339 344
diff --git a/include/pwd_.h b/include/pwd_.h
index e40b71dab..ea158da45 100644
--- a/include/pwd_.h
+++ b/include/pwd_.h
@@ -30,7 +30,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
30 * We will use libc-defined structures, but will #define function names 30 * We will use libc-defined structures, but will #define function names
31 * so that function calls are directed to bb_internal_XXX replacements 31 * so that function calls are directed to bb_internal_XXX replacements
32 */ 32 */
33 33#undef endpwent
34#define setpwent bb_internal_setpwent 34#define setpwent bb_internal_setpwent
35#define endpwent bb_internal_endpwent 35#define endpwent bb_internal_endpwent
36#define getpwent bb_internal_getpwent 36#define getpwent bb_internal_getpwent