[PATCH spice-server v3 31/32] Use structure for socket_t type instead of just a typedef

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

 



Allows the compiler to catch errors mixing int and sockets.
Make easier to keep Windows port working.
This technique was used to port SPICE server to Windows.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/sys-socket.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/sys-socket.h b/server/sys-socket.h
index eea0b443..09b0a3d3 100644
--- a/server/sys-socket.h
+++ b/server/sys-socket.h
@@ -23,7 +23,7 @@
 
 #include <stdbool.h>
 
-#if 0
+#if ENABLE_EXTRA_CHECKS
 typedef struct {
     int fd;
 } socket_t;
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]