1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

libserialport_internal: use new macro to enable timeradd, etc.

Since glibc 2.20, the usage of _BSD_SOURCE is deprecated. Fix it like
described here:

https://sourceware.org/glibc/wiki/Release/2.20#Deprecation_of__BSD_SOURCE_and__SVID_SOURCE_feature_macros

This fixes bug #716.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Wolfram Sang 2015-12-28 14:33:40 +01:00 committed by Uwe Hermann
parent ae2c5825e7
commit 4d8195fe3f

View File

@ -23,7 +23,9 @@
#ifdef __linux__
#define _BSD_SOURCE /* For timeradd, timersub, timercmp. */
/* For timeradd, timersub, timercmp. */
#define _BSD_SOURCE 1 /* for glibc < 2.19 */
#define _DEFAULT_SOURCE 1 /* for glibc >= 2.20 */
#endif
#include <string.h>