From 277f832a6a15cf54cfb1a45cc7f1462951bf42cd Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sat, 4 Jan 2020 15:39:54 +0000 Subject: [PATCH] Define _POSIX_C_SOURCE to 199309L to get clock_gettime(). --- libserialport_internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libserialport_internal.h b/libserialport_internal.h index d784472..0ad6f70 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -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