1 dnl ---------------------------------------------------------------------------
2 dnl Macro: SETSOCKOPT_TEST
3 dnl ---------------------------------------------------------------------------
8 #include <sys/socket.h>
13 int sock = socket(AF_INET, SOCK_STREAM, 0);
14 struct timeval waittime;
17 waittime.tv_usec= 500;
19 if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
20 &waittime, (socklen_t)sizeof(struct timeval)) == -1) {
21 if (errno == ENOPROTOOPT) {
27 ], AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO]))
31 #include <sys/types.h>
32 #include <sys/socket.h>
37 int sock = socket(AF_INET, SOCK_STREAM, 0);
38 struct timeval waittime;
41 waittime.tv_usec= 500;
43 if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO,
44 &waittime, (socklen_t)sizeof(struct timeval)) == -1) {
45 if (errno == ENOPROTOOPT) {
51 ], AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO]))
53 dnl ---------------------------------------------------------------------------
54 dnl End Macro: SETSOCKOPT_TEST
55 dnl ---------------------------------------------------------------------------