From: Martin Ling Date: Sun, 24 Aug 2014 12:34:33 +0000 (+0100) Subject: linux: Define feature macros to get required functions. X-Git-Tag: libserialport-0.1.1~108 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c51b846eee030002cc2d3b8faac1c373de02e10f;p=libserialport.git linux: Define feature macros to get required functions. This is needed to build with -std=c99. --- diff --git a/libserialport_internal.h b/libserialport_internal.h index 962fc20..bef84b6 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -18,6 +18,11 @@ * along with this program. If not, see . */ +#ifdef __linux__ +#define _BSD_SOURCE // for timeradd, timersub, timercmp +#define _XOPEN_SOURCE 700 // for readlinkat +#endif + #include #include #include