diff --git a/Makefile b/Makefile index 3e0ab11..e9b7da0 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,10 @@ XTENSA_TOOLS_ROOT ?= # base directory of the ESP8266 SDK package, absolute SDK_BASE ?= /opt/Espressif/ESP8266_SDK +# Opensdk patches stdint.h when compiled with an internal SDK. If you run into compile problems pertaining to +# redefinition of int types, try setting this to 'yes'. +USE_OPENSDK?=no + #Esptool.py path and port ESPTOOL ?= esptool.py ESPPORT ?= /dev/ttyUSB0 @@ -57,7 +61,7 @@ LIBS += esphttpd # compiler flags using during compilation of source files CFLAGS = -Os -ggdb -std=gnu99 -Werror -Wpointer-arith -Wundef -Wall -Wl,-EL -fno-inline-functions \ - -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH -D_STDINT_H \ + -nostdlib -mlongcalls -mtext-section-literals -D__ets__ -DICACHE_FLASH \ -Wno-address # linker flags used to generate the main object file @@ -104,6 +108,12 @@ Q := @ vecho := @echo endif +ifeq ($(USE_OPENSDK),"yes") +CFLAGS += -DUSE_OPENSDK +else +CFLAGS += -D_STDINT_H +endif + ifeq ("$(GZIP_COMPRESSION)","yes") CFLAGS += -DGZIP_COMPRESSION endif diff --git a/libesphttpd b/libesphttpd index 1ccb78b..674e953 160000 --- a/libesphttpd +++ b/libesphttpd @@ -1 +1 @@ -Subproject commit 1ccb78b150e3b58dacd1db74c2509c7a04465f17 +Subproject commit 674e95318a0f3d1fdceaa023a0ecf48d80bfd5f4