kumquat-buildroot/package/libuhttpd/libuhttpd.mk
Fabrice Fontaine e83f6edf43 package/libuhttpd: disable -Werror
Disable -Werror to fix the following build failure raised at least since
bump to version 3.9.0 in commit e76d9868c9
and
81db1fa371:

/home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c: In function '__serve_file':
/home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:322:50: error: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type '__off_t' {aka 'long int'} [-Werror=format=]
  322 |         conn->send_header(conn, "Content-Range", "bytes */%" PRIu64, st->st_size);
      |                                                  ^~~~~~~~~~~         ~~~~~~~~~~~
      |                                                                        |
      |                                                                        __off_t {aka long int}
In file included from /home/autobuild/autobuild/instance-8/output-1/build/libuhttpd-3.14.1/src/file.c:36:
/home/autobuild/autobuild/instance-8/output-1/per-package/libuhttpd/host/mips64el-buildroot-linux-uclibc/sysroot/usr/include/inttypes.h:91:41: note: format string is defined here
   91 | # define PRIu64         __PRI64_PREFIX "u"
cc1: all warnings being treated as errors

Fixes: e76d9868c9
 - http://autobuild.buildroot.org/results/46349a1409f9cff027b462456078284459e75511

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 5961b21918)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-08 09:10:02 +02:00

50 lines
1.3 KiB
Makefile

################################################################################
#
# libuhttpd
#
################################################################################
LIBUHTTPD_VERSION = 3.14.1
LIBUHTTPD_SITE = https://github.com/zhaojh329/libuhttpd/releases/download/v$(LIBUHTTPD_VERSION)
LIBUHTTPD_LICENSE = MIT
LIBUHTTPD_LICENSE_FILES = LICENSE
LIBUHTTPD_INSTALL_STAGING = YES
LIBUHTTPD_DEPENDENCIES = libev
LIBUHTTPD_CONF_OPTS = -DBUILD_WERROR=OFF
ifeq ($(BR2_PACKAGE_OPENSSL),y)
LIBUHTTPD_DEPENDENCIES += openssl
LIBUHTTPD_CONF_OPTS += \
-DSSL_SUPPORT=ON \
-DUSE_MBEDTLS=OFF \
-DUSE_OPENSSL=ON \
-DUSE_WOLFSSL=OFF
else ifeq ($(BR2_PACKAGE_WOLFSSL_ALL),y)
LIBUHTTPD_DEPENDENCIES += wolfssl
LIBUHTTPD_CONF_OPTS += \
-DSSL_SUPPORT=ON \
-DUSE_MBEDTLS=OFF \
-DUSE_OPENSSL=OFF \
-DUSE_WOLFSSL=ON
else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
LIBUHTTPD_DEPENDENCIES += mbedtls
LIBUHTTPD_CONF_OPTS += \
-DSSL_SUPPORT=ON \
-DUSE_MBEDTLS=ON \
-DUSE_OPENSSL=OFF \
-DUSE_WOLFSSL=OFF
else
LIBUHTTPD_CONF_OPTS += \
-DSSL_SUPPORT=OFF
endif
# BUILD_STATIC builds *only* the static lib, which is not what we want for
# BR2_SHARED_STATIC.
ifeq ($(BR2_STATIC_LIBS),y)
LIBUHTTPD_CONF_OPTS += -DBUILD_STATIC=ON
else
LIBUHTTPD_CONF_OPTS += -DBUILD_STATIC=OFF
endif
$(eval $(cmake-package))