Closed panzhongxian closed 2 years ago
Please submit same fix to upstream zlib, then link it here. Thanks.
Hi, @wolfpld I read the zlib code. In zlib, when we call ./configure, the unistd.h will be checked. If the file exists, file zconf.h will be modified FROM:
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
TO:
#if 1 /* was set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
While we use the build.sh and Makefile in etcpak, this checking are not executed.
I push a new commit, in which I only changed the build.mk to add a definition instead of changing zlib source code. Since unistd.h is a poxis api header file, I believe the change of unix/build.mk is acceptable. Please check it.
When cd to unix and execute
make release
on MacOS, we will get the error:Fix the error by adding
#include <unistd.h>
explicitly.