2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

make: fix compilation on alpine

Starting with the musl v1.2.4~69, _GNU_SOURCE doesn't set _LARGEFILE64_SOURCE.

Fixes #2313
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Andrei Vagin 2023-12-27 20:33:30 -08:00
parent 7b689b7a42
commit b419f3dfdc
3 changed files with 3 additions and 2 deletions

View File

@ -106,6 +106,7 @@ export PROTOUFIX DEFINES
# #
# Independent options for all tools. # Independent options for all tools.
DEFINES += -D_FILE_OFFSET_BITS=64 DEFINES += -D_FILE_OFFSET_BITS=64
DEFINES += -D_LARGEFILE64_SOURCE
DEFINES += -D_GNU_SOURCE DEFINES += -D_GNU_SOURCE
WARNINGS := -Wall -Wformat-security -Wdeclaration-after-statement -Wstrict-prototypes WARNINGS := -Wall -Wformat-security -Wdeclaration-after-statement -Wstrict-prototypes

View File

@ -47,6 +47,6 @@ RUN apk add \
# The rpc test cases are running as user #1000, let's add the user # The rpc test cases are running as user #1000, let's add the user
RUN adduser -u 1000 -D test RUN adduser -u 1000 -D test
RUN pip3 install junit_xml RUN pip3 install junit_xml --break-system-packages
RUN make -C test/zdtm RUN make -C test/zdtm

View File

@ -41,7 +41,7 @@ PKG_CONFIG ?= pkg-config
CFLAGS += -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 CFLAGS += -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS += -Wdeclaration-after-statement -Wstrict-prototypes CFLAGS += -Wdeclaration-after-statement -Wstrict-prototypes
CFLAGS += $(USERCFLAGS) $(ARCHCFLAGS) CFLAGS += $(USERCFLAGS) $(ARCHCFLAGS)
CFLAGS += -D_GNU_SOURCE CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
CPPFLAGS += -iquote $(LIBDIR)/arch/$(ARCH)/include CPPFLAGS += -iquote $(LIBDIR)/arch/$(ARCH)/include
ifeq ($(strip $(V)),) ifeq ($(strip $(V)),)