6139aeacd8
Fix the following build failure with gcc 4.8 raised since bump to
version 7.8 in commit f9e51e1150
:
/home/buildroot/autobuild/run/instance-2/output-1/build/mongoose-7.8/mongoose.c: In function 'mg_iotest':
/home/buildroot/autobuild/run/instance-2/output-1/build/mongoose-7.8/mongoose.c:4484:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (struct mg_connection *c = mgr->conns; c != NULL; c = c->next) {
^
Fixes:
- http://autobuild.buildroot.org/results/c538c6d8e87e4e24097c9878ee15083802276505
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
################################################################################
|
|
#
|
|
# mongoose
|
|
#
|
|
################################################################################
|
|
|
|
MONGOOSE_VERSION = 7.8
|
|
MONGOOSE_SITE = $(call github,cesanta,mongoose,$(MONGOOSE_VERSION))
|
|
MONGOOSE_LICENSE = GPL-2.0
|
|
MONGOOSE_LICENSE_FILES = LICENSE
|
|
MONGOOSE_CPE_ID_VENDOR = cesenta
|
|
MONGOOSE_INSTALL_STAGING = YES
|
|
# static library
|
|
MONGOOSE_INSTALL_TARGET = NO
|
|
|
|
MONGOOSE_CFLAGS = $(TARGET_CFLAGS) -std=gnu99
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
MONGOOSE_DEPENDENCIES += openssl
|
|
MONGOOSE_CFLAGS += -DMG_ENABLE_OPENSSL=1
|
|
else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
|
|
MONGOOSE_DEPENDENCIES += mbedtls
|
|
MONGOOSE_CFLAGS += -DMG_ENABLE_MBEDTLS=1
|
|
endif
|
|
|
|
define MONGOOSE_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CC) -c $(@D)/mongoose.c $(MONGOOSE_CFLAGS) -o $(@D)/mongoose.o
|
|
$(TARGET_MAKE_ENV) $(TARGET_AR) rcs $(@D)/libmongoose.a $(@D)/mongoose.o
|
|
endef
|
|
|
|
define MONGOOSE_INSTALL_STAGING_CMDS
|
|
$(INSTALL) -D -m 644 $(@D)/libmongoose.a \
|
|
$(STAGING_DIR)/usr/lib/libmongoose.a
|
|
$(INSTALL) -D -m 644 $(@D)/mongoose.h \
|
|
$(STAGING_DIR)/usr/include/mongoose.h
|
|
endef
|
|
|
|
$(eval $(generic-package))
|