commit b488a30: [Minor] Add recvmmsg detection

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jun 2 11:14:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-01 15:35:03 +0100
URL: https://github.com/rspamd/rspamd/commit/b488a309f514fecf7cda9bb5ccb53803a5034210

[Minor] Add recvmmsg detection

---
 CMakeLists.txt | 5 +++++
 config.h.in    | 1 +
 2 files changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e60b9cf84..0af33f1fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -505,6 +505,11 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
 	# on a build system. On the other hand, we know that linux has stupid
 	# but compatible shmem support, so we assume this macro as true
 	SET(HAVE_SANE_SHMEM 1)
+	CHECK_C_SOURCE_COMPILES ("#define _GNU_SOURCE
+						  #include <sys/socket.h>
+						  int main (int argc, char **argv) {
+							return ((int*)(&recvmmsg))[argc];
+						  }" HAVE_RECVMMSG)
 ELSE()
 	CHECK_C_SOURCE_RUNS("
 	#include <sys/mman.h>
diff --git a/config.h.in b/config.h.in
index 013a0873c..adb799864 100644
--- a/config.h.in
+++ b/config.h.in
@@ -83,6 +83,7 @@
 #cmakedefine HAVE_PWD_H          1
 #cmakedefine HAVE_RDTSC          1
 #cmakedefine HAVE_READPASSPHRASE_H  1
+#cmakedefine HAVE_RECVMMSG       1
 #cmakedefine HAVE_RUSAGE_SELF    1
 #cmakedefine HAVE_SA_SIGINFO     1
 #cmakedefine HAVE_SANE_SHMEM     1


More information about the Commits mailing list