0003-fix-compilation-issues-with-musl.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From 8aa6aa4ba2d9d00c91e36e146895af20cbc00d17 Mon Sep 17 00:00:00 2001
  2. From: Brendan Heading <brendanheading@gmail.com>
  3. Date: Wed, 2 Sep 2015 12:10:58 +0100
  4. Subject: [PATCH 1/1] fix compilation issues with musl.
  5. - sys/time.h needed for struct timeval
  6. - unistd.h should not be included due to clash with encrypt(3)
  7. - sys/types.h needed for mode_t
  8. Note that this version of bluez is 3 years old. Recent fixes have gone
  9. into the upstream to address musl compatibility issues, but the upstream
  10. has changed so much that it makes little sense to try to backport these.
  11. This patch is really a stopgap until we move to the latest upstream.
  12. Upstream-Status: not needed
  13. Signed-off-by: Brendan Heading <brendanheading@gmail.com>
  14. ---
  15. compat/bnep.c | 1 +
  16. compat/dund.c | 1 -
  17. src/textfile.h | 1 +
  18. 3 files changed, 2 insertions(+), 1 deletion(-)
  19. diff --git a/compat/bnep.c b/compat/bnep.c
  20. index 281350b..49226c1 100644
  21. --- a/compat/bnep.c
  22. +++ b/compat/bnep.c
  23. @@ -32,6 +32,7 @@
  24. #include <stdlib.h>
  25. #include <sys/socket.h>
  26. #include <sys/ioctl.h>
  27. +#include <sys/time.h>
  28. #include <bluetooth/bluetooth.h>
  29. #include <bluetooth/bnep.h>
  30. diff --git a/compat/dund.c b/compat/dund.c
  31. index af1b536..c2f085f 100644
  32. --- a/compat/dund.c
  33. +++ b/compat/dund.c
  34. @@ -29,7 +29,6 @@
  35. #include <stdio.h>
  36. #include <errno.h>
  37. #include <fcntl.h>
  38. -#include <unistd.h>
  39. #include <stdlib.h>
  40. #include <string.h>
  41. #include <syslog.h>
  42. diff --git a/src/textfile.h b/src/textfile.h
  43. index dc5fc2b..0148b30 100644
  44. --- a/src/textfile.h
  45. +++ b/src/textfile.h
  46. @@ -24,6 +24,7 @@
  47. #ifndef __TEXTFILE_H
  48. #define __TEXTFILE_H
  49. +#include <sys/types.h>
  50. int create_dirs(const char *filename, const mode_t mode);
  51. int create_file(const char *filename, const mode_t mode);
  52. int create_name(char *buf, size_t size, const char *path,
  53. --
  54. 2.4.3