Fwd: Re: [Help-gnutls] Problem building from git

Brad Hards bradh at frogmouth.net
Tue Jul 14 11:52:47 CEST 2009


On Tuesday 14 July 2009 03:38:18 Nikos Mavrogiannopoulos wrote:
> Simon has added gl_fd_to_handle() that could be used with an inline
> function to perform this cast gracefully... but I don't really know if
> it is the proper place.
I have another suggestion, based on that macro. Its pretty trivial. I'm just a 
bit confused about what gl/tests/test-sockets.c is trying to do.

With this, I've got the tests passing.

Brad
-------------- next part --------------
commit 108d4baeb6a885879d33457e0c59bb2b45f8e538
Author: Brad Hards <bradh at frogmouth.net>
Date:   Tue Jul 14 18:01:16 2009 +1000

    Fix up building on 64-bit.

diff --git a/gl/sockets.h b/gl/sockets.h
index b42e368..581ffdc 100644
--- a/gl/sockets.h
+++ b/gl/sockets.h
@@ -44,7 +44,7 @@ gl_fd_to_handle (int fd)
 
 #else
 
-#define gl_fd_to_handle(x) (x)
+#define gl_fd_to_handle(x) (&(x))
 
 #endif /* WINDOWS_SOCKETS */
 
diff --git a/gl/tests/test-sockets.c b/gl/tests/test-sockets.c
index 3c85a43..1fd668f 100644
--- a/gl/tests/test-sockets.c
+++ b/gl/tests/test-sockets.c
@@ -40,7 +40,7 @@ main (int argc, char *argv[])
       return 1;
     }
 
-  (void) gl_fd_to_handle (0);
+  // (void) gl_fd_to_handle (0);
 
   return 0;
 }


More information about the Gnutls-help mailing list