1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #6104 from smlng/pr/macos/cbor/fix_redefined_macro

cbor: fix redefined macro error on macOS
This commit is contained in:
Oleg Hahm 2016-11-11 09:37:20 +01:00 committed by GitHub
commit c53ba48f8f
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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 <stdbool.h>
#include <stdint.h>
#include <stdlib.h>