diff --git a/Makefile b/Makefile index 1d91a2bcdf9..8e3f55ede36 100644 --- a/Makefile +++ b/Makefile @@ -2455,6 +2455,7 @@ PUBLIC_HEADERS_C += \ LIBZ_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBZ_SRC)))) $(LIBZ_OBJS): CFLAGS += -fvisibility=hidden +$(LIBZ_OBJS): CPPFLAGS += -DHAVE_UNISTD_H $(LIBDIR)/$(CONFIG)/libz.a: $(LIBZ_OBJS) $(E) "[AR] Creating $@" diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 7494e3bc01b..27a3573187e 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -216,6 +216,7 @@ defaults: LDFLAGS: -g zlib: CFLAGS: -fvisibility=hidden + CPPFLAGS: -DHAVE_UNISTD_H php_config_m4: deps: - grpc