diff --git a/CMakeLists.txt b/CMakeLists.txt index 72efb85..e406d1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,7 @@ if(STATIC_BUILD) COMMAND patch -d -p1 -i "${PATCHES_DIR}/librdkafka-tarantool-security-72.patch" COMMAND patch -d -p1 -i "${PATCHES_DIR}/librdkafka-tarantool-security-94.patch" COMMAND patch -d -p1 -i "${PATCHES_DIR}/librdkafka-fix-ubsan.patch" + COMMAND patch -d -p1 -i "${PATCHES_DIR}/librdkafka-fix-centos7.patch" ) add_library(librdkafka_static INTERFACE) diff --git a/patches/librdkafka-fix-centos7.patch b/patches/librdkafka-fix-centos7.patch new file mode 100644 index 0000000..5ae9eb3 --- /dev/null +++ b/patches/librdkafka-fix-centos7.patch @@ -0,0 +1,17 @@ +diff --git a/src/rdrand.c b/src/rdrand.c +index 77d02cfc..ad388e2a 100644 +--- a/src/rdrand.c ++++ b/src/rdrand.c +@@ -32,10 +32,12 @@ + #include "tinycthread.h" + #include "rdmurmur2.h" + #ifndef _WIN32 ++#ifdef HAVE_GETENTROPY + /* getentropy() can be present in one of these two */ + #include + #include + #endif ++#endif + + #ifdef HAVE_OSSL_SECURE_RAND_BYTES + #include