summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-01-28 21:02:34 -0800
committerElliott Hughes <enh@google.com>2015-01-29 20:12:13 -0800
commit5038b19cef207b526f9993951e4a04c8df91ce1d (patch)
tree0b28230d8ca0b0cd311a0d2a590f04b6f17e4da2 /libc
parentcd1959b0c506cfa9e89ac7deb56bdb6461b28c3a (diff)
downloadbionic-5038b19cef207b526f9993951e4a04c8df91ce1d.zip
bionic-5038b19cef207b526f9993951e4a04c8df91ce1d.tar.gz
bionic-5038b19cef207b526f9993951e4a04c8df91ce1d.tar.bz2
Break two incorrect transitive includes.
Change-Id: I95519caa5258cf5c6b8053f1c7e08ade2a824e49
Diffstat (limited to 'libc')
-rw-r--r--libc/include/string.h1
-rw-r--r--libc/include/sys/select.h10
2 files changed, 8 insertions, 3 deletions
diff --git a/libc/include/string.h b/libc/include/string.h
index 4ca77ae..d67928c 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -31,7 +31,6 @@
#include <sys/cdefs.h>
#include <stddef.h>
-#include <malloc.h>
#include <xlocale.h>
__BEGIN_DECLS
diff --git a/libc/include/sys/select.h b/libc/include/sys/select.h
index 553050b..0c4a823 100644
--- a/libc/include/sys/select.h
+++ b/libc/include/sys/select.h
@@ -31,7 +31,6 @@
#include <linux/time.h>
#include <signal.h>
-#include <string.h>
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -49,7 +48,14 @@ typedef struct {
#define __FDMASK(fd) (1UL << ((fd) % NFDBITS))
#define __FDS_BITS(set) (((fd_set*)(set))->fds_bits)
-#define FD_ZERO(set) (memset(set, 0, sizeof(*(fd_set*)(set))))
+/* Inline loop so we don't have to declare memset. */
+#define FD_ZERO(set) \
+ do { \
+ size_t __i; \
+ for (__i = 0; __i < __FDSET_LONGS; ++__i) { \
+ (set)->fds_bits[__i] = 0; \
+ } \
+ } while (0)
extern void __FD_CLR_chk(int, fd_set*, size_t);
extern void __FD_SET_chk(int, fd_set*, size_t);