THRIFT-3572 Fix "Unable to determine the behavior of a signed right shift"
Client: Build (c_glib)
Patch: Chandler May
This closes #816
diff --git a/lib/c_glib/CMakeLists.txt b/lib/c_glib/CMakeLists.txt
index b409fbe..04bdba7 100644
--- a/lib/c_glib/CMakeLists.txt
+++ b/lib/c_glib/CMakeLists.txt
@@ -62,6 +62,9 @@
# Install the headers
install(DIRECTORY "src/thrift" DESTINATION "${INCLUDE_INSTALL_DIR}"
FILES_MATCHING PATTERN "*.h")
+# Copy config.h file
+install(DIRECTORY "${CMAKE_BINARY_DIR}/thrift" DESTINATION "${INCLUDE_INSTALL_DIR}"
+ FILES_MATCHING PATTERN "*.h")
if(BUILD_TESTING)
add_subdirectory(test)
diff --git a/lib/c_glib/src/thrift/c_glib/protocol/thrift_compact_protocol.c b/lib/c_glib/src/thrift/c_glib/protocol/thrift_compact_protocol.c
index 1b36904..5ff33b3 100644
--- a/lib/c_glib/src/thrift/c_glib/protocol/thrift_compact_protocol.c
+++ b/lib/c_glib/src/thrift/c_glib/protocol/thrift_compact_protocol.c
@@ -24,6 +24,8 @@
#include <thrift/c_glib/protocol/thrift_protocol.h>
#include <thrift/c_glib/protocol/thrift_compact_protocol.h>
+#include <thrift/config.h>
+
/*
* *_to_zigzag depend on the fact that the right shift
* operator on a signed integer is an arithmetic (sign-extending) shift.