podman: fix compilation with musl 1.2.4
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 19 May 2023 07:53:38 +0000 (15:53 +0800)
committerTianling Shen <cnsztl@gmail.com>
Fri, 19 May 2023 14:30:41 +0000 (22:30 +0800)
musl 1.2.4 deprecated legacy "LFS64" ("large file support") interfaces so
just having _GNU_SOURCE defined is not enough anymore.

Manually pass -D_LARGEFILE64_SOURCE to allow to keep using LFS64 definitions.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
utils/podman/Makefile

index 961ffad0764bc9f3a043be0d572af3d04e60582a..82e930a6508ffb91d4ddd9629b27e8e161cad97f 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=podman
 PKG_VERSION:=4.5.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/containers/podman/archive/v$(PKG_VERSION)
@@ -107,6 +107,10 @@ define Build/Prepare
        $(eval $(call Download,default-policy))
 endef
 
+ifneq ($(CONFIG_USE_MUSL),)
+  TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
+endif
+
 define Package/podman/install
        $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/podman
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{podman,podman-remote} $(1)/usr/bin/