summaryrefslogtreecommitdiffstats
path: root/package/android-tools/0007-include-cdefs-h-when-needed.patch
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-08-18 23:50:16 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-08-19 11:33:57 +0200
commit6e8617f22247d761ae42dd637c7dda4ee2106f5b (patch)
tree8c2f9e65caeeb22ca5bdd57c67b31f7060dc0c32 /package/android-tools/0007-include-cdefs-h-when-needed.patch
parent93120632f034b20caa80132e8c1b7f16e10e7e26 (diff)
downloadbuildroot-6e8617f22247d761ae42dd637c7dda4ee2106f5b.tar.gz
buildroot-6e8617f22247d761ae42dd637c7dda4ee2106f5b.zip
package/android-tools: drop musl-compatibility cdefs patching out
We now always have a sys/cdefs.h, so we no longer need to patch it out. Simplify the patch by removing any hunk removing cdefs.h or the use of __BEGIN_DECLS/__END_DECLS. However, it must be included when macros it defines are being used. Also, renumber patches to guarantee ordering (static patch was added before big-endian one). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/android-tools/0007-include-cdefs-h-when-needed.patch')
-rw-r--r--package/android-tools/0007-include-cdefs-h-when-needed.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/package/android-tools/0007-include-cdefs-h-when-needed.patch b/package/android-tools/0007-include-cdefs-h-when-needed.patch
new file mode 100644
index 0000000000..da4ee13a17
--- /dev/null
+++ b/package/android-tools/0007-include-cdefs-h-when-needed.patch
@@ -0,0 +1,41 @@
+Include cdefs.h wherever it is needed
+
+cdefs.h is included from within a lot of glibc headers, so it almost
+invariably and automagically gets pulled in with glibc.
+
+However, this might not be the case with other C libraries. musl does
+not provide cdefs.h so it does not include it from its own headers
+(cdefs.h must be provided separately).
+
+So we must include it when we are going to use macros it provides.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+---
+ core/adbd/services.c | 1 +
+ core/libcutils/android_reboot.c | 1 +
+ 2 files changed, 2 insertions(+), 0 deletion(-)
+
+diff --git a/core/adbd/services.c b/core/adbd/services.c
+index 20c08d2..48e0241 100644
+--- a/core/adbd/services.c
++++ b/core/adbd/services.c
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <pwd.h>
++#include <sys/cdefs.h>
+
+ #include "sysdeps.h"
+
+diff --git a/core/libcutils/android_reboot.c b/core/libcutils/android_reboot.c
+index 20c08d2..48e0241 100644
+--- a/core/libcutils/android_reboot.c
++++ b/core/libcutils/android_reboot.c
+@@ -23,6 +23,7 @@
+ #include <string.h>
+ #include <linux/reboot.h>
+ #include <sys/syscall.h>
++#include <sys/cdefs.h>
+
+ #include <cutils/android_reboot.h>
+
OpenPOWER on IntegriCloud