+check_type(pid_t sys/types.h)
+check_type(ssize_t sys/types.h)
+check_type("struct msghdr" sys/socket.h)
+
+check_cxx_symbol(abi::__cxa_demangle cxxabi.h)
+check_symbol(ERESTART errno.h)
+check_symbol(fcntl fcntl.h)
+check_symbol(gettimeofday sys/time.h)
+check_symbol(htonll arpa/inet.h)
+check_symbol(index strings.h)
+check_symbol(MSG_DONTWAIT sys/socket.h)
+check_symbol(MSG_MORE sys/socket.h)
+check_symbol(MSG_NOSIGNAL sys/socket.h)
+check_symbol(SO_RCVTIMEO sys/socket.h)
+check_symbol(SO_SNDTIMEO sys/socket.h)
+check_symbol(rand stdlib.h)
+check_symbol(random stdlib.h)
+check_symbol(realpath stdlib.h)
+check_symbol(sendmsg sys/socket.h)
+check_symbol(setenv stdlib.h)
+check_symbol(strerror_r string.h)
+check_c_source("
+ #include <string.h>
+ int main() {
+ char x;
+ return *strerror_r(0, &x, 1);
+ }"
+ HAVE_STRERROR_R_CHAR_P
+)
+
+if(WIN32)
+ check_include(io.h)
+ check_include(winsock2.h)
+ check_include(ws2tcpip.h)
+
+ check_symbol(htonll winsock2.h)
+endif()