[zig cc] unistd.h doesn't appear to reflect the targeted glibc version #22765
Labels
bug
Observed behavior contradicts documented or intended behavior
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
zig cc
Zig as a drop-in C compiler feature
Milestone
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
Hello!
I'm trying to compile utils-linux with
zig cc
while targeting glibc 2.17.From what I can see, the glibc library itself is correctly missing symbols added in later versions, however
unistd.h
does include the prototypes for such functions.In this case,
close_range
which was added in 2.34This leads to compile error as utils-linux attempts to provide a compat function:
The setup can easily be reproduced with
git clone --depth=1 https://github.com/util-linux/util-linux.git && cd util-linux && mkdir build-zig && ./autogen.sh && cd build-zig && CC='zig cc --target=x86_64-linux-gnu.2.17' ../configure && make
Expected Behavior
unistd.h
doesn't include declaration for functions unavailable in the targeted glibc versionThe text was updated successfully, but these errors were encountered: