OSDN Git Service

Ensure header files using __BEGIN_DECLS include sys/cdefs.h.
authorElliott Hughes <enh@google.com>
Thu, 6 Jun 2013 00:51:20 +0000 (17:51 -0700)
committerElliott Hughes <enh@google.com>
Thu, 6 Jun 2013 00:58:08 +0000 (17:58 -0700)
We keep fixing these one-by-one; let's fix them all at once.

Found thus:

  find . -name *.h | xargs grep -L sys/cdefs.h | xargs grep -l BEGIN_DECL | xargs grep -L sys/types

Change-Id: I188842aa2484dc6176e96556d57c38a0f785b59b

libc/bionic/pthread_internal.h
libc/include/mntent.h
libc/include/netinet/in.h
libc/include/sys/auxv.h
libc/include/sys/signalfd.h
libc/include/sys/timeb.h
libc/netbsd/net/reentrant.h
libc/private/bionic_auxv.h
libc/private/bionic_futex.h
libc/private/bionic_time.h
libc/private/resolv_private.h

index 0eb0e0a..316a14a 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <pthread.h>
 #include <stdbool.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
index b83da1f..8b87f71 100644 (file)
@@ -29,6 +29,7 @@
 #define _MNTENT_H_
 
 #include <stdio.h>
+#include <sys/cdefs.h>
 
 #define MNTTYPE_IGNORE "ignore"
 
index c5b964e..bf3b498 100644 (file)
 #define _NETINET_IN_H_
 
 #include <endian.h>
+#include <netinet/in6.h>
+#include <sys/cdefs.h>
 #include <sys/socket.h>
+
 #include <linux/in.h>
 #include <linux/in6.h>
 #include <linux/ipv6.h>
-#include <netinet/in6.h>
 
 __BEGIN_DECLS
 
index 918442f..0d753c3 100644 (file)
@@ -29,6 +29,7 @@
 #define _SYS_AUXV_H_
 
 #include <linux/auxvec.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
index c03a0e9..a249d65 100644 (file)
@@ -29,8 +29,9 @@
 #ifndef _SYS_SIGNALFD_H_
 #define _SYS_SIGNALFD_H_
 
-#include <signal.h>
 #include <linux/signalfd.h>
+#include <signal.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
index f2cc39c..cf6f255 100644 (file)
@@ -28,6 +28,7 @@
 #ifndef _SYS_TIMEB_H
 #define _SYS_TIMEB_H
 
+#include <sys/cdefs.h>
 #include <sys/time.h>
 
 __BEGIN_DECLS
index 15507eb..60bff08 100644 (file)
 
 #include <pthread.h>
 #include <signal.h>
+#include <sys/cdefs.h>
 
 #define        mutex_t                 pthread_mutex_t
 #define        MUTEX_INITIALIZER       PTHREAD_MUTEX_INITIALIZER
index 69d15b6..23b2e37 100644 (file)
@@ -29,6 +29,7 @@
 #define _PRIVATE_BIONIC_AUXV_H_
 
 #include <elf.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
index 6c7fdbe..69658b1 100644 (file)
@@ -29,6 +29,7 @@
 #define _BIONIC_FUTEX_H
 
 #include <linux/futex.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
index 464ab0f..7c80f59 100644 (file)
@@ -29,6 +29,7 @@
 #define _BIONIC_TIME_H
 
 #include <time.h>
+#include <sys/cdefs.h>
 
 __BEGIN_DECLS
 
index 0f3c6c0..c43c84c 100644 (file)
@@ -54,6 +54,8 @@
 #ifndef _RESOLV_PRIVATE_H_
 #define        _RESOLV_PRIVATE_H_
 
+#include <sys/cdefs.h>
+
 #include <resolv.h>
 #include "resolv_static.h"