Commit 4fe39e0f authored by deryck's avatar deryck Committed by Facebook Github Bot

moved FOLLY_HAVE_SENDMMSG to FollyConfigChecks.cmake for issue #1011 (#1053)

Summary:
Compile error on Linux 2.6.32-754.6.3.el6.x86_64 /gcc 7.4/NetOps.cpp (issue #1011)
Pull Request resolved: https://github.com/facebook/folly/pull/1053

Reviewed By: Orvid

Differential Revision: D14454590

Pulled By: yfeldblum

fbshipit-source-id: 9c4dccfa30291dd0fb830cc2417c17568ae4fde3
parent 7e962169
......@@ -74,6 +74,8 @@ check_symbol_exists(preadv sys/uio.h FOLLY_HAVE_PREADV)
check_symbol_exists(pwritev sys/uio.h FOLLY_HAVE_PWRITEV)
check_symbol_exists(clock_gettime time.h FOLLY_HAVE_CLOCK_GETTIME)
check_symbol_exists(pipe2 unistd.h FOLLY_HAVE_PIPE2)
check_symbol_exists(sendmmsg sys/socket.h FOLLY_HAVE_SENDMMSG)
check_symbol_exists(recvmmsg sys/socket.h FOLLY_HAVE_RECVMMSG)
check_function_exists(malloc_usable_size FOLLY_HAVE_MALLOC_USABLE_SIZE)
......
......@@ -79,3 +79,5 @@
#cmakedefine FOLLY_ASAN_ENABLED 1
#cmakedefine FOLLY_SUPPORT_SHARED_LIBRARY 1
#cmakedefine FOLLY_HAVE_SENDMMSG 1
#cmakedefine FOLLY_HAVE_RECVMMSG 1
......@@ -18,6 +18,7 @@
#include <cstdint>
#include <folly/Portability.h>
#include <folly/net/NetworkSocket.h>
#include <folly/portability/IOVec.h>
#include <folly/portability/SysTypes.h>
......@@ -71,13 +72,11 @@
#define UDP_MAX_SEGMENTS (1 << 6UL)
#endif
#if (!__linux__) || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
#if !(FOLLY_HAVE_RECVMMSG || FOLLY_HAVE_SENDMMSG)
struct mmsghdr {
struct msghdr msg_hdr;
unsigned int msg_len;
};
#else
#define FOLLY_HAVE_SENDMMSG 1
#endif
#else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment