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:
parent
ae2c5825e7
commit
4d8195fe3f
@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __linux__
|
#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
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user