python3-libselinux: fix compilation with musl 1.2.4
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 19 May 2023 13:45:21 +0000 (21:45 +0800)
committerTianling Shen <cnsztl@gmail.com>
Sat, 20 May 2023 05:07:15 +0000 (13:07 +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>
lang/python/python3-libselinux/Makefile

index 95cb2a8139fa6706555afd97c08e298c349ff172..f56483b44d14f2a4e1000d93be8b89e2d9e3b307 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 SRC_NAME:=libselinux
 PKG_NAME:=python3-$(SRC_NAME)
 PKG_VERSION:=3.3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/python-libselinux/$(SRC_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(SRC_NAME)-$(PKG_VERSION).tar.gz
@@ -48,6 +48,10 @@ define Package/python3-libselinux/description
        This package provides the Python bindings for libselinux.
 endef
 
+ifneq ($(CONFIG_USE_MUSL),)
+  TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
+endif
+
 MAKE_FLAGS += \
        FTS_LDLIBS=-lfts \
        SHLIBDIR=/usr/lib \