From c51b846eee030002cc2d3b8faac1c373de02e10f Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Sun, 24 Aug 2014 13:34:33 +0100 Subject: [PATCH] linux: Define feature macros to get required functions. This is needed to build with -std=c99. --- libserialport_internal.h | 5 +++++ 1 file changed, 5 insertions(+) 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