diff options
author | Frank Hunleth <[email protected]> | 2018-10-11 10:20:39 -0400 |
---|---|---|
committer | Frank Hunleth <[email protected]> | 2018-10-11 10:24:24 -0400 |
commit | d6d37f2424d11ad322beb3d155f18f63c3c845eb (patch) | |
tree | e8485a4a5ef0a05aa8be3381af316269024622f7 /erts/emulator/zlib/zlib.mk | |
parent | e8da077caffcbe4648701b1eba7d737ee5fc135a (diff) | |
download | otp-d6d37f2424d11ad322beb3d155f18f63c3c845eb.tar.gz otp-d6d37f2424d11ad322beb3d155f18f63c3c845eb.tar.bz2 otp-d6d37f2424d11ad322beb3d155f18f63c3c845eb.zip |
Allow undefined macros when building zlib
When building Erlang on a system that uses the Musl C library, it's
possible to get the following error:
In file included from zlib/adler32.c:11:0:
zlib/zutil.h:172:39: error: "_LFS64_LARGEFILE" is not defined [-Werror=undef]
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
On the same systems, zlib is built without `-Werror=undef` so do the
same when building it with Erlang.
Signed-off-by: Frank Hunleth <[email protected]>
Diffstat (limited to 'erts/emulator/zlib/zlib.mk')
-rw-r--r-- | erts/emulator/zlib/zlib.mk | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/zlib/zlib.mk b/erts/emulator/zlib/zlib.mk index 3f0d64d250..986bd33dc5 100644 --- a/erts/emulator/zlib/zlib.mk +++ b/erts/emulator/zlib/zlib.mk @@ -62,6 +62,9 @@ ZLIB_CFLAGS = $(subst -O2, -O3, $(CONFIGURE_CFLAGS) $(DEFS) $(THR_DEFS)) endif # debug endif # gcov +# Don't fail if _LFS64_LARGEFILE is undefined +ZLIB_CFLAGS := $(filter-out -Werror=undef,$(ZLIB_CFLAGS)) + ifeq ($(TARGET), win32) $(ZLIB_LIBRARY): $(ZLIB_OBJS) $(V_AR) -out:$@ $(ZLIB_OBJS) |