0007-include-cdefs-h-when-needed.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. Include cdefs.h wherever it is needed
  2. cdefs.h is included from within a lot of glibc headers, so it almost
  3. invariably and automagically gets pulled in with glibc.
  4. However, this might not be the case with other C libraries. musl does
  5. not provide cdefs.h so it does not include it from its own headers
  6. (cdefs.h must be provided separately).
  7. So we must include it when we are going to use macros it provides.
  8. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  9. ---
  10. core/adbd/services.c | 1 +
  11. core/libcutils/android_reboot.c | 1 +
  12. 2 files changed, 2 insertions(+), 0 deletion(-)
  13. diff --git a/core/adbd/services.c b/core/adbd/services.c
  14. index 20c08d2..48e0241 100644
  15. --- a/core/adbd/services.c
  16. +++ b/core/adbd/services.c
  17. @@ -20,6 +20,7 @@
  18. #include <string.h>
  19. #include <errno.h>
  20. #include <pwd.h>
  21. +#include <sys/cdefs.h>
  22. #include "sysdeps.h"
  23. diff --git a/core/libcutils/android_reboot.c b/core/libcutils/android_reboot.c
  24. index 20c08d2..48e0241 100644
  25. --- a/core/libcutils/android_reboot.c
  26. +++ b/core/libcutils/android_reboot.c
  27. @@ -23,6 +23,7 @@
  28. #include <string.h>
  29. #include <linux/reboot.h>
  30. #include <sys/syscall.h>
  31. +#include <sys/cdefs.h>
  32. #include <cutils/android_reboot.h>