summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-07-08 06:34:28 (GMT)
committer Denys Vlasenko <vda.linux@googlemail.com>2011-07-08 06:34:28 (GMT)
commit8f6ce094dc780010e51e38bf96b9d107cefdd4b6 (patch)
tree9ed961ac07cbd230d12bd3f4f25f257736f1477c
parent126f2b2853502a7e74e73c11b86a25510a76b9c0 (diff)
downloadbusybox-8f6ce094dc780010e51e38bf96b9d107cefdd4b6.tar.gz
busybox-8f6ce094dc780010e51e38bf96b9d107cefdd4b6.tar.bz2
a few tweaks for bionic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/inet_common.c3
-rw-r--r--libbb/obscure.c2
-rw-r--r--miscutils/adjtimex.c6
-rw-r--r--miscutils/setserial.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/libbb/inet_common.c b/libbb/inet_common.c
index 207720e..7208db9 100644
--- a/libbb/inet_common.c
+++ b/libbb/inet_common.c
@@ -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;
}
diff --git a/libbb/obscure.c b/libbb/obscure.c
index dd8cd31..9ecc1f6 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -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);
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index 98b6ccf..c8816e9 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -23,7 +23,11 @@
//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,
diff --git a/miscutils/setserial.c b/miscutils/setserial.c
index 26902a2..2a034e3 100644
--- a/miscutils/setserial.c
+++ b/miscutils/setserial.c
@@ -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.