diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-07-08 08:34:28 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-07-08 08:34:28 +0200 |
commit | 8f6ce094dc780010e51e38bf96b9d107cefdd4b6 (patch) | |
tree | 9ed961ac07cbd230d12bd3f4f25f257736f1477c | |
parent | 126f2b2853502a7e74e73c11b86a25510a76b9c0 (diff) | |
download | busybox-w32-8f6ce094dc780010e51e38bf96b9d107cefdd4b6.tar.gz busybox-w32-8f6ce094dc780010e51e38bf96b9d107cefdd4b6.tar.bz2 busybox-w32-8f6ce094dc780010e51e38bf96b9d107cefdd4b6.zip |
a few tweaks for bionic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libbb/inet_common.c | 3 | ||||
-rw-r--r-- | libbb/obscure.c | 2 | ||||
-rw-r--r-- | miscutils/adjtimex.c | 6 | ||||
-rw-r--r-- | miscutils/setserial.c | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/libbb/inet_common.c b/libbb/inet_common.c index 207720e96..7208db9ea 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) | |||
175 | return -1; | 175 | return -1; |
176 | } | 176 | } |
177 | memcpy(sin6, ai->ai_addr, sizeof(*sin6)); | 177 | memcpy(sin6, ai->ai_addr, sizeof(*sin6)); |
178 | freeaddrinfo(ai); | 178 | if (ai) |
179 | freeaddrinfo(ai); | ||
179 | return 0; | 180 | return 0; |
180 | } | 181 | } |
181 | 182 | ||
diff --git a/libbb/obscure.c b/libbb/obscure.c index dd8cd319a..9ecc1f672 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 | |||
109 | if (string_checker(new_p, pw->pw_name)) { | 109 | if (string_checker(new_p, pw->pw_name)) { |
110 | return "similar to username"; | 110 | return "similar to username"; |
111 | } | 111 | } |
112 | #ifndef __BIONIC__ | ||
112 | /* no gecos as-is, as sub-string, reversed, capitalized, doubled */ | 113 | /* no gecos as-is, as sub-string, reversed, capitalized, doubled */ |
113 | if (pw->pw_gecos[0] && string_checker(new_p, pw->pw_gecos)) { | 114 | if (pw->pw_gecos[0] && string_checker(new_p, pw->pw_gecos)) { |
114 | return "similar to gecos"; | 115 | return "similar to gecos"; |
115 | } | 116 | } |
117 | #endif | ||
116 | /* hostname as-is, as sub-string, reversed, capitalized, doubled */ | 118 | /* hostname as-is, as sub-string, reversed, capitalized, doubled */ |
117 | hostname = safe_gethostname(); | 119 | hostname = safe_gethostname(); |
118 | i = string_checker(new_p, hostname); | 120 | i = string_checker(new_p, hostname); |
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 98b6ccfbf..c8816e9e7 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -23,7 +23,11 @@ | |||
23 | //usage: "\n -p TCONST" | 23 | //usage: "\n -p TCONST" |
24 | 24 | ||
25 | #include "libbb.h" | 25 | #include "libbb.h" |
26 | #include <sys/timex.h> | 26 | #ifdef __BIONIC__ |
27 | # include <linux/timex.h> | ||
28 | #else | ||
29 | # include <sys/timex.h> | ||
30 | #endif | ||
27 | 31 | ||
28 | static const uint16_t statlist_bit[] = { | 32 | static const uint16_t statlist_bit[] = { |
29 | STA_PLL, | 33 | STA_PLL, |
diff --git a/miscutils/setserial.c b/miscutils/setserial.c index 26902a273..2a034e32c 100644 --- a/miscutils/setserial.c +++ b/miscutils/setserial.c | |||
@@ -11,7 +11,7 @@ | |||
11 | //config:config SETSERIAL | 11 | //config:config SETSERIAL |
12 | //config: bool "setserial" | 12 | //config: bool "setserial" |
13 | //config: default y | 13 | //config: default y |
14 | //config: depends on PLATFORM_LINUX | 14 | //config: select PLATFORM_LINUX |
15 | //config: help | 15 | //config: help |
16 | //config: Retrieve or set Linux serial port. | 16 | //config: Retrieve or set Linux serial port. |
17 | 17 | ||