Fix the Mac
authorMiguel de Icaza <miguel@gnome.org>
Thu, 21 May 2009 02:36:05 +0000 (02:36 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 21 May 2009 02:36:05 +0000 (02:36 -0000)
svn path=/trunk/mono/; revision=134500

mono/io-layer/sockets.c

index 1c0949c41845fa5033841857d390419404a259ad..bafcf53faeaeb465ce6ce34389de61b0406e7f8f 100644 (file)
@@ -1305,8 +1305,8 @@ int ioctlsocket(guint32 fd, gint32 command, gpointer arg)
                        // ai_canonname can be null in some cases on darwin, where the runtime assumes it will
                        // be the value of the ip buffer.
 
-                       socklen_t optlen = sizeof (amount);
-                       ret = getsockopt (sock, SOL_SOCKET, SO_NREAD, &amount, &optlen);
+                       socklen_t optlen = sizeof (int);
+                       ret = getsockopt (sock, SOL_SOCKET, SO_NREAD, arg, &optlen);
 #else
                        ret = ioctl (fd, command, arg);
 #endif