X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=libserialport_internal.h;fp=libserialport_internal.h;h=5b811cc3bef665c02764fb4bbba0f0105cfe182b;hb=2be41b1265e9c433a1a2af435e040388453fc603;hp=20b3505925a0d8e79d00ae21f641f1a0ac429f32;hpb=f6abee5c78b1d4d7bcfd8bd08bd57baa5f011ba2;p=libserialport.git diff --git a/libserialport_internal.h b/libserialport_internal.h index 20b3505..5b811cc 100644 --- a/libserialport_internal.h +++ b/libserialport_internal.h @@ -27,8 +27,8 @@ #define _CRT_SECURE_NO_WARNINGS #endif -/* These Linux/glibc specific defines must appear before other headers.*/ -#ifdef __linux__ +/* These feature test macros must appear before other headers.*/ +#if defined(__linux__) || defined(__CYGWIN__) /* For timeradd, timersub, timercmp, realpath. */ #define _BSD_SOURCE 1 /* for glibc < 2.19 */ #define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */