From 32a96fef44fcba718b2368e45862c256d36eb97c Mon Sep 17 00:00:00 2001 From: ZhouyihaiDing Date: Sat, 24 Mar 2018 19:06:24 -0700 Subject: [PATCH] PHP: fix pecl build error --- config.m4 | 4 ++-- templates/config.m4.template | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.m4 b/config.m4 index d4ec9a9cd36..2f6d996c62d 100644 --- a/config.m4 +++ b/config.m4 @@ -11,8 +11,8 @@ if test "$PHP_GRPC" != "no"; then LIBS="-lpthread $LIBS" - CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11 -g -O2" - CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -g -O2" + CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11 -g -O2 -D PB_FIELD_16BIT=1" + CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -g -O2 -D PB_FIELD_16BIT=1" GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" PHP_REQUIRE_CXX() PHP_ADD_LIBRARY(pthread) diff --git a/templates/config.m4.template b/templates/config.m4.template index c039c53ffa5..9877e4be186 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -13,8 +13,8 @@ LIBS="-lpthread $LIBS" - CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11 -g -O2" - CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -g -O2" + CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11 -g -O2 -D PB_FIELD_16BIT=1" + CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti -g -O2 -D PB_FIELD_16BIT=1" GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" PHP_REQUIRE_CXX() PHP_ADD_LIBRARY(pthread)