socat: work around missing stddef.h include
authorJo-Philipp Wich <redacted>
Tue, 17 Jan 2017 20:24:12 +0000 (21:24 +0100)
committerJo-Philipp Wich <redacted>
Tue, 17 Jan 2017 20:24:12 +0000 (21:24 +0100)
The buildbots fail to build socat due to the following error:

    nestlex.c:14:7: error: unknown type name 'ptrdiff_t'

It appears that certain source files do not include all required headers,
depending on the configure options passed to socat.

Work around the error by passing `-include stddef.h` via `TARGET_CFLAGS` to
forcibly inject this header file into all compilation units.

Signed-off-by: Jo-Philipp Wich <redacted>
net/socat/Makefile

index b89ffcad296f1a3c8807d5d6469334155619bb71..193bebebe4894c593ad66d5d4ffbe8ce43069db9 100644 (file)
@@ -69,6 +69,9 @@ CONFIGURE_VARS += \
        sc_cv_sys_tabdly_shift=11 \
        sc_cv_sys_csize_shift=4
 
+TARGET_CFLAGS += \
+       -include stddef.h
+
 define Package/socat/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
git clone https://git.99rst.org/PROJECT