]> sigrok.org Git - libserialport.git/blobdiff - libserialport_internal.h
Define _POSIX_C_SOURCE to 199309L to get clock_gettime().
[libserialport.git] / libserialport_internal.h
index d784472bb12d0c218413d645ff38e3dec8588da3..0ad6f701a05a631e7d22daefa4e1f1c1caa6c215 100644 (file)
@@ -26,6 +26,8 @@
 /* For timeradd, timersub, timercmp, realpath. */
 #define _BSD_SOURCE 1 /* for glibc < 2.19 */
 #define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */
+/* For clock_gettime and associated types. */
+#define _POSIX_C_SOURCE 199309L
 #endif
 
 #include <string.h>