Fixed compilation on NetBSD. 10/3010/1
authorJoakim Soderberg <joakim.soderberg@gmail.com>
Wed, 6 Feb 2013 06:31:20 +0000 (15:31 +0900)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:31 +0000 (13:01 -0800)
lib/client-handshake.c

index 3b5a00d..1a574b7 100644 (file)
@@ -12,7 +12,7 @@ struct libwebsocket *__libwebsocket_client_connect_2(
        int plen = 0;
        char pkt[512];
        int opt = 1;
-#if defined(__APPLE__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__)
        struct protoent *tcp_proto;
 #endif
 
@@ -63,7 +63,7 @@ struct libwebsocket *__libwebsocket_client_connect_2(
        bzero(&server_addr.sin_zero, 8);
 
        /* Disable Nagle */
-#if !defined(__APPLE__) && !defined(__FreeBSD__)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__NetBSD__)
        setsockopt(wsi->sock, SOL_TCP, TCP_NODELAY,
                                              (const void *)&opt, sizeof(opt));
 #else