0001-port.h-include-sys-time.h.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 021543b02b6fdb78c9217757736eabac90a647eb Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 26 Sep 2020 12:37:38 +0200
  4. Subject: [PATCH] port.h: include <sys/time.h>
  5. Include <sys/time.h> to avoid the following build failure on musl:
  6. port.h:361:29: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
  7. const char *str, struct timeval *tv,
  8. ^~~~~~~
  9. portconfig.c: In function 'myconfig':
  10. portconfig.c:586:9: error: variable 'tv' has initializer but incomplete type
  11. struct timeval tv = { 0, 0 };
  12. ^~~~~~~
  13. Fixes:
  14. - http://autobuild.buildroot.org/results/4c0b238186cb2fb2d81807ce006945594f92b2cd
  15. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  16. [Upstream status: https://github.com/cminyard/ser2net/pull/34]
  17. ---
  18. port.h | 1 +
  19. 1 file changed, 1 insertion(+)
  20. diff --git a/port.h b/port.h
  21. index 048c5bd..86c3b1d 100644
  22. --- a/port.h
  23. +++ b/port.h
  24. @@ -9,6 +9,7 @@
  25. #define PORT
  26. #include <netdb.h>
  27. +#include <sys/time.h>
  28. #include "gbuf.h"
  29. #include "absout.h"
  30. --
  31. 2.28.0