gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r12195 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r12195 - gnunet/src/util
Date: Fri, 9 Jul 2010 16:44:21 +0200

Author: wachs
Date: 2010-07-09 16:44:21 +0200 (Fri, 09 Jul 2010)
New Revision: 12195

Modified:
   gnunet/src/util/network.c
Log:
Fixed compile warnings under windows

Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c   2010-07-09 12:38:03 UTC (rev 12194)
+++ gnunet/src/util/network.c   2010-07-09 14:44:21 UTC (rev 12195)
@@ -175,10 +175,15 @@
 static void
 socket_set_nodelay (const struct GNUNET_NETWORK_Handle *h)
 {
+#ifndef WINDOWS  
   int value = 1;
-  if (0 !=
-      setsockopt (h->fd, IPPROTO_TCP, TCP_NODELAY, &value, sizeof (value)))
+  if (0 != setsockopt (h->fd, IPPROTO_TCP, TCP_NODELAY, &value, sizeof 
(value)))
     GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "setsockopt");
+#else
+  const char * value = "1";
+  if (0 != setsockopt (h->fd, IPPROTO_TCP, TCP_NODELAY, value, sizeof (value)))
+    GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "setsockopt");
+#endif 
 }
 
 
@@ -411,13 +416,14 @@
                                        *desc)
 {
   int error;
-  int pending;
 
   /* How much is there to be read? */
 #ifndef WINDOWS
+  int pending;
   error = ioctl (desc->fd, FIONREAD, &pending);
   if (error == 0)
 #else
+  u_long pending;
   error = ioctlsocket (desc->fd, FIONREAD, &pending);
   if (error != SOCKET_ERROR)
 #endif
@@ -876,7 +882,7 @@
       {
         HANDLE *h;
 
-        h = GNUNET_CONTAINER_slist_get (it, NULL);
+        h = (HANDLE *) GNUNET_CONTAINER_slist_get ((const struct 
GNUNET_CONTAINER_SList_Iterator *)it, NULL);
         if (GNUNET_CONTAINER_slist_contains
             (fds2->handles, h, sizeof (HANDLE)))
           {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]