a few tweaks for bionic
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 8 Jul 2011 06:34:28 +0000 (08:34 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 8 Jul 2011 06:34:28 +0000 (08:34 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/inet_common.c
libbb/obscure.c
miscutils/adjtimex.c
miscutils/setserial.c

index 207720e96dcf50f89860dde2fa4cd8225796b608..7208db9ea9b254d6f185b23c64eb56b2ab97b95c 100644 (file)
@@ -175,7 +175,8 @@ int FAST_FUNC INET6_resolve(const char *name, struct sockaddr_in6 *sin6)
                return -1;
        }
        memcpy(sin6, ai->ai_addr, sizeof(*sin6));
-       freeaddrinfo(ai);
+       if (ai)
+               freeaddrinfo(ai);
        return 0;
 }
 
index dd8cd319a023a3c4b430cafa23a3d161971a4793..9ecc1f672cc127f113248b15c5a89395d5b61013 100644 (file)
@@ -109,10 +109,12 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
        if (string_checker(new_p, pw->pw_name)) {
                return "similar to username";
        }
+#ifndef __BIONIC__
        /* no gecos as-is, as sub-string, reversed, capitalized, doubled */
        if (pw->pw_gecos[0] && string_checker(new_p, pw->pw_gecos)) {
                return "similar to gecos";
        }
+#endif
        /* hostname as-is, as sub-string, reversed, capitalized, doubled */
        hostname = safe_gethostname();
        i = string_checker(new_p, hostname);
index 98b6ccfbfe3dfdbd01ae84646f6607fb215de009..c8816e9e7cbcd057628e131e915a4a0ab603c5fd 100644 (file)
 //usage:     "\n       -p TCONST"
 
 #include "libbb.h"
-#include <sys/timex.h>
+#ifdef __BIONIC__
+# include <linux/timex.h>
+#else
+# include <sys/timex.h>
+#endif
 
 static const uint16_t statlist_bit[] = {
        STA_PLL,
index 26902a27328bb2cd4e0212d3cd4476853c3f2564..2a034e32c0976834bdf675c38ddc700711a49a83 100644 (file)
@@ -11,7 +11,7 @@
 //config:config SETSERIAL
 //config:      bool "setserial"
 //config:      default y
-//config:      depends on PLATFORM_LINUX
+//config:      select PLATFORM_LINUX
 //config:      help
 //config:        Retrieve or set Linux serial port.