Skip to content

Commit

Permalink
make: fix compilation on alpine
Browse files Browse the repository at this point in the history
Starting with the musl v1.2.4~69, _GNU_SOURCE doesn't set _LARGEFILE64_SOURCE.

Fixes checkpoint-restore#2313
Signed-off-by: Andrei Vagin <[email protected]>
  • Loading branch information
avagin authored and rst0git committed Dec 28, 2023
1 parent 61224f2 commit 422249b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export PROTOUFIX DEFINES
#
# Independent options for all tools.
DEFINES += -D_FILE_OFFSET_BITS=64
DEFINES += -D_LARGEFILE64_SOURCE
DEFINES += -D_GNU_SOURCE

WARNINGS := -Wall -Wformat-security -Wdeclaration-after-statement -Wstrict-prototypes
Expand Down
2 changes: 1 addition & 1 deletion test/zdtm/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PKG_CONFIG ?= pkg-config
CFLAGS += -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
CFLAGS += -Wdeclaration-after-statement -Wstrict-prototypes
CFLAGS += $(USERCFLAGS) $(ARCHCFLAGS)
CFLAGS += -D_GNU_SOURCE
CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
CPPFLAGS += -iquote $(LIBDIR)/arch/$(ARCH)/include

ifeq ($(strip $(V)),)
Expand Down

0 comments on commit 422249b

Please sign in to comment.