gpiod.h: include missing <time.h> include
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 23 Jan 2017 08:17:15 +0000 (21:17 +1300)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 23 Jan 2017 10:06:24 +0000 (11:06 +0100)
gpiod.h uses "struct timespec", but forgets to include the <time.h>
header which defines "struct timespec". This causes a build error with
the musl C library:

In file included from core.c:11:0:
../../include/gpiod.h:232:49: warning: â€˜struct timespec’ declared inside parameter list
 typedef int (*gpiod_event_cb)(int, const struct timespec *, void *);

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Bartosz: tweaked the commit message]
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
include/gpiod.h

index 8c5858e27503219ab3733c2cab5de841c4e7ccab..c1f252d53a777c60dbaed041f432184b24d1236c 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <stdlib.h>
 #include <stdbool.h>
+#include <time.h>
 
 #ifdef __cplusplus
 extern "C" {