From: Martin Ling Date: Sat, 4 Jan 2020 15:39:54 +0000 (+0000) Subject: Define _POSIX_C_SOURCE to 199309L to get clock_gettime(). X-Git-Url: https://sigrok.org/gitweb/?p=libserialport.git;a=commitdiff_plain;h=277f832a6a15cf54cfb1a45cc7f1462951bf42cd Define _POSIX_C_SOURCE to 199309L to get clock_gettime(). --- 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