#include <inttypes.h>
#include <errno.h>
#include <stdio.h>
+#include <unistd.h>
int main(int argc, char *argv[]) {
int s;
struct sockaddr_storage sa;
socklen_t salen;
uint16_t port;
-
+
if ((s = socket(PF_INET6, SOCK_STREAM, 0)) < 0) {
if (errno == EAFNOSUPPORT)
s = socket(PF_INET, SOCK_STREAM, 0);
-
+
if (s < 0) {
perror("socket()");
return 1;
/* ... hic sunt leones ... */
sleep(60);
-
+
return 0;
}