OSDN Git Service

Android: don't define functions already in BIONIC_O oreo-x86 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-8.1-r6
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 27 Feb 2019 10:59:44 +0000 (18:59 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 27 Feb 2019 11:02:52 +0000 (19:02 +0800)
android/android.c
include/android.h

index 3eb3363..6820274 100644 (file)
@@ -32,6 +32,7 @@ char *getusershell() { return NULL; }
 void setusershell() {}
 void endusershell() {}
 
+#ifndef BIONIC_O
 struct mntent *getmntent_r(FILE *fp, struct mntent *mnt, char *buf, int buflen)
 {
        char *tokp = NULL, *s;
@@ -89,10 +90,8 @@ char *hasmntopt(const struct mntent *mnt, const char *opt)
 
 /* declared in grp.h, but not necessary */
 #if !ENABLE_USE_BB_PWD_GRP
-#ifndef BIONIC_O
 int setpwent() { return 0; }
-#endif
 void setgrent() {}
 void endgrent() {}
 #endif
-
+#endif
index 651f7df..676b7f6 100644 (file)
 
 #define killpg_busybox(P, S) kill(-(P), S)
 
+#if !defined(BIONIC_O)
 #define setmntent fopen
 #define endmntent fclose
+#endif
 
 /* defined in bionic/utmp.c */
 void endutent(void);
@@ -83,9 +85,8 @@ char *hasmntopt(const struct mntent *, const char *);
 /* bionic's vfork is rather broken; for now a terrible bandaid: */
 #define vfork fork
 
-#if !defined(BIONIC_L) && !defined(BLOATCHECK)
+#if defined(BIONIC_L) && !defined(BLOATCHECK)
 #define _SOCKLEN_T_DECLARED
-typedef int socklen_t;
 #endif
 
 /* wait3 was removed in android L */