Open vanfanel opened 5 days ago
can u check why unistd isnt included for your case?
@m4xw I don't quite get the question. It was not included because it was not there.
I had to add #include <unistd.h
to custom/dependencies/libzlib/gzlib.c
, custom/dependencies/libzlib/gzread.c
, and custom/dependencies/libzlib/gzwrite.c
.
Still I don't get it, because as you can see the needed header file isn't present in those. The cause would be that.. it's not there :)
I am using gcc version 14.2.0 (Debian 14.2.0-6) on Debian Trixie. Maybe on older GCC or lib versions, unistd was indirectly included on another header or something.
its in zconf.h and gzguts.h so why its not being included for you?
It's not in gzguts.h at all, and in zconf.h it's only included if certain conditions are met.
But even so, only gzguts.h is included in custom/dependencies/libzlib/gzlib.c
, custom/dependencies/libzlib/gzread.c
, and custom/dependencies/libzlib/gzwrite.c
, not zconf.h.
What's more: in Makefile, -DHAVE_UNISTD_H=1
is only passed for OS X, not GNU/Linux, so the unistd.h inclusion in zconf.h could be compromised on GNU/Linux for the lack of -DHAVE_UNISTD_H=1
I guess.
gzguts includes zlib which includes zconf
gzguts hides it behind emscripten so i guess we encountered it before, in your case it seems that largefile isnt defined and I think the have unistd define should be set via configure which we dont run.
solution is either define Z_HAVE_UNISTD_H via -DZ_HAVE_UNISTD_H or enable largefile support
(or just HAVE_UNISTD_H but that just defines Z_HAVE_UNISTD_H)
I am fine with including -DHAVE_UNISTD_H
What's more: in Makefile,
-DHAVE_UNISTD_H=1
is only passed for OS X, not GNU/Linux, so the unistd.h inclusion in zconf.h could be compromised on GNU/Linux for the lack of-DHAVE_UNISTD_H=1
I guess.
Yea i think so far it has been implicitly declared and thats not happy on gcc14
guess both #536 and #526 provide the solution, i will get them in by next week
Hello there,
I have tried to build latest GIT code today and I get this:
Was building working fine time ago.