]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - network.h
Fixes for Debian bug #192701 (64-bit gccs warn about casts between
[PuTTY.git] / network.h
index ad45547d25c3f6fa0051fb6feed408da9ee89ed5..9a7a50cf54056faae188f68f0bdd568e9ae62b27 100644 (file)
--- a/network.h
+++ b/network.h
@@ -25,6 +25,10 @@ typedef struct SockAddr_tag *SockAddr;
 typedef struct socket_function_table **Socket;
 typedef struct plug_function_table **Plug;
 
+#ifndef OSSOCKET_DEFINED
+typedef void *OSSocket;
+#endif
+
 struct socket_function_table {
     Plug(*plug) (Socket s, Plug p);
     /* use a different plug (return the old one) */
@@ -64,7 +68,7 @@ struct plug_function_table {
      * on a socket is cleared or partially cleared. The new backlog
      * size is passed in the `bufsize' parameter.
      */
-    int (*accepting)(Plug p, void *sock);
+    int (*accepting)(Plug p, OSSocket sock);
     /*
      * returns 0 if the host at address addr is a valid host for connecting or error
      */
@@ -100,7 +104,7 @@ Socket sk_new(SockAddr addr, int port, int privport, int oobinline,
 
 Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only);
 
-Socket sk_register(void *sock, Plug plug);
+Socket sk_register(OSSocket sock, Plug plug);
 
 #define sk_plug(s,p) (((*s)->plug) (s, p))
 #define sk_close(s) (((*s)->close) (s))