xref: /OK3568_Linux_fs/buildroot/package/android-tools/0007-include-cdefs-h-when-needed.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunInclude cdefs.h wherever it is needed
2*4882a593Smuzhiyun
3*4882a593Smuzhiyuncdefs.h is included from within a lot of glibc headers, so it almost
4*4882a593Smuzhiyuninvariably and automagically gets pulled in with glibc.
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunHowever, this might not be the case with other C libraries. musl does
7*4882a593Smuzhiyunnot provide cdefs.h so it does not include it from its own headers
8*4882a593Smuzhiyun(cdefs.h must be provided separately).
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSo we must include it when we are going to use macros it provides.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunSigned-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
13*4882a593Smuzhiyun---
14*4882a593Smuzhiyun core/adbd/services.c                  |  1 +
15*4882a593Smuzhiyun core/libcutils/android_reboot.c       |  1 +
16*4882a593Smuzhiyun 2 files changed, 2 insertions(+), 0 deletion(-)
17*4882a593Smuzhiyun
18*4882a593Smuzhiyundiff --git a/core/adbd/services.c b/core/adbd/services.c
19*4882a593Smuzhiyunindex 20c08d2..48e0241 100644
20*4882a593Smuzhiyun--- a/core/adbd/services.c
21*4882a593Smuzhiyun+++ b/core/adbd/services.c
22*4882a593Smuzhiyun@@ -20,6 +20,7 @@
23*4882a593Smuzhiyun #include <string.h>
24*4882a593Smuzhiyun #include <errno.h>
25*4882a593Smuzhiyun #include <pwd.h>
26*4882a593Smuzhiyun+#include <sys/cdefs.h>
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun #include "sysdeps.h"
29*4882a593Smuzhiyun
30*4882a593Smuzhiyundiff --git a/core/libcutils/android_reboot.c b/core/libcutils/android_reboot.c
31*4882a593Smuzhiyunindex 20c08d2..48e0241 100644
32*4882a593Smuzhiyun--- a/core/libcutils/android_reboot.c
33*4882a593Smuzhiyun+++ b/core/libcutils/android_reboot.c
34*4882a593Smuzhiyun@@ -23,6 +23,7 @@
35*4882a593Smuzhiyun #include <string.h>
36*4882a593Smuzhiyun #include <linux/reboot.h>
37*4882a593Smuzhiyun #include <sys/syscall.h>
38*4882a593Smuzhiyun+#include <sys/cdefs.h>
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun #include <cutils/android_reboot.h>
41*4882a593Smuzhiyun
42