Skip to content

Allow undefined macros when building zlib#1981

Merged
jhogberg merged 1 commit into
erlang:masterfrom
fhunleth:fix-muslc-compiler-error
Oct 17, 2018
Merged

Allow undefined macros when building zlib#1981
jhogberg merged 1 commit into
erlang:masterfrom
fhunleth:fix-muslc-compiler-error

Conversation

@fhunleth
Copy link
Copy Markdown
Contributor

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 fhunleth@troodon-software.com

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 <fhunleth@troodon-software.com>
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Oct 15, 2018
@jhogberg jhogberg self-assigned this Oct 16, 2018
@jhogberg jhogberg merged commit d6d37f2 into erlang:master Oct 17, 2018
@jhogberg
Copy link
Copy Markdown
Contributor

Merged, thanks for the PR!

@fhunleth fhunleth deleted the fix-muslc-compiler-error branch March 19, 2022 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants