mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #7783 from kYc0o/fix_cbor_arm
sys/cbor: fix compilation with newlib
This commit is contained in:
commit
a6cb09cfa6
10
Makefile.dep
10
Makefile.dep
@ -8,6 +8,12 @@ OLD_USEPKG := $(sort $(USEPKG))
|
||||
# pull dependencies from drivers
|
||||
include $(RIOTBASE)/drivers/Makefile.dep
|
||||
|
||||
ifneq (,$(filter cbor_ctime,$(USEMODULE)))
|
||||
ifneq (,$(filter newlib,$(USEMODULE)))
|
||||
USEMODULE += newlib_gnu_source
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter csma_sender,$(USEMODULE)))
|
||||
USEMODULE += random
|
||||
USEMODULE += xtimer
|
||||
@ -381,6 +387,10 @@ ifneq (,$(filter od,$(USEMODULE)))
|
||||
USEMODULE += fmt
|
||||
endif
|
||||
|
||||
ifneq (,$(filter newlib_gnu_source,$(USEMODULE)))
|
||||
USEMODULE += newlib
|
||||
endif
|
||||
|
||||
ifneq (,$(filter newlib_nano,$(USEMODULE)))
|
||||
USEMODULE += newlib
|
||||
endif
|
||||
|
@ -9,6 +9,10 @@ ifneq (,$(filter newlib_nano,$(USEMODULE)))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter newlib_gnu_source,$(USEMODULE)))
|
||||
CFLAGS += -D_GNU_SOURCE=1
|
||||
endif
|
||||
|
||||
ifeq (1,$(USE_NEWLIB_NANO))
|
||||
export LINKFLAGS += -specs=nano.specs
|
||||
endif
|
||||
|
@ -52,6 +52,7 @@ PSEUDOMODULES += netstats_l2
|
||||
PSEUDOMODULES += netstats_ipv6
|
||||
PSEUDOMODULES += netstats_rpl
|
||||
PSEUDOMODULES += newlib
|
||||
PSEUDOMODULES += newlib_gnu_source
|
||||
PSEUDOMODULES += newlib_nano
|
||||
PSEUDOMODULES += openthread
|
||||
PSEUDOMODULES += pktqueue
|
||||
|
@ -1,7 +1,7 @@
|
||||
MODULE = cbor
|
||||
|
||||
ifneq ($(shell uname -s),Darwin)
|
||||
CFLAGS += -D_XOPEN_SOURCE=600
|
||||
CFLAGS += -D_XOPEN_SOURCE=600
|
||||
endif
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef MODULE_CBOR_CTIME
|
||||
#include <time.h>
|
||||
#endif
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user