0001-include-gpiod.h-include-missing-time.h-include.patch 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 93fd4a02233d29f78b261d99d9ce6b14869b19c7 Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Mon, 23 Jan 2017 21:17:15 +1300
  4. Subject: [PATCH] include/gpiod.h: include missing <time.h> include
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. gpiod.h uses "struct timespec", but forgets to include the <time.h>
  9. header which defines "struct timespec". This causes a build error with
  10. the musl C library:
  11. In file included from core.c:11:0:
  12. ../../include/gpiod.h:232:49: warning: ‘struct timespec’ declared inside parameter list
  13. typedef int (*gpiod_event_cb)(int, const struct timespec *, void *);
  14. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  15. ---
  16. include/gpiod.h | 1 +
  17. 1 file changed, 1 insertion(+)
  18. diff --git a/include/gpiod.h b/include/gpiod.h
  19. index 8c5858e..c1f252d 100644
  20. --- a/include/gpiod.h
  21. +++ b/include/gpiod.h
  22. @@ -22,6 +22,7 @@
  23. #include <stdlib.h>
  24. #include <stdbool.h>
  25. +#include <time.h>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. --
  29. 2.7.4