1 dnl ---------------------------------------------------------------------------
2 dnl Macro: SETSOCKOPT_TEST
3 dnl ---------------------------------------------------------------------------
8 #include <sys/socket.h>
12 int sock = socket(AF_INET, SOCK_STREAM, 0);
13 struct timeval waittime;
16 waittime.tv_usec= 500;
18 if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
19 &waittime, (socklen_t)sizeof(struct timeval)) == -1) {
20 if (errno == ENOPROTOOPT) {
26 ], AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO]))
30 #include <sys/types.h>
31 #include <sys/socket.h>
35 int sock = socket(AF_INET, SOCK_STREAM, 0);
36 struct timeval waittime;
39 waittime.tv_usec= 500;
41 if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO,
42 &waittime, (socklen_t)sizeof(struct timeval)) == -1) {
43 if (errno == ENOPROTOOPT) {
49 ], AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO]))
51 dnl ---------------------------------------------------------------------------
52 dnl End Macro: SETSOCKOPT_TEST
53 dnl ---------------------------------------------------------------------------