diff --git a/cpu/native/Makefile.include b/cpu/native/Makefile.include index 890d558293..638fa148d4 100644 --- a/cpu/native/Makefile.include +++ b/cpu/native/Makefile.include @@ -8,5 +8,5 @@ endif export USEMODULE += periph ifeq ($(shell uname -s),Darwin) -export CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE +export CFLAGS += -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE endif diff --git a/sys/cbor/Makefile b/sys/cbor/Makefile index ea880700a7..871bd3925d 100644 --- a/sys/cbor/Makefile +++ b/sys/cbor/Makefile @@ -1,6 +1,9 @@ MODULE = cbor CFLAGS += -DCBOR_NO_PRINT +ifneq ($(shell uname -s),Darwin) + CFLAGS += -D_XOPEN_SOURCE=600 +endif ifeq (,$(filter native,$(BOARD))) # build the minimal subset for non-native diff --git a/sys/include/cbor.h b/sys/include/cbor.h index f47eeedad3..9b59dbf972 100644 --- a/sys/include/cbor.h +++ b/sys/include/cbor.h @@ -101,11 +101,6 @@ #ifndef CBOR_H #define CBOR_H -#ifndef CBOR_NO_CTIME -/* 'strptime' is only declared when this macro is defined */ -#define _XOPEN_SOURCE -#endif - #include #include #include