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

cbor: fix redefined macro error on macOS

This commit is contained in:
smlng 2016-11-10 14:30:55 +01:00
parent 04c23f376d
commit e867d83eff
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>