aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sysemu/os-posix.h2
-rw-r--r--include/sysemu/os-win32.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index 378213f..1030d39 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -51,8 +51,6 @@ void os_daemonize(void);
void os_setup_post(void);
int os_mlock(void);
-#define closesocket(s) close(s)
-
int os_set_daemonize(bool d);
bool is_daemonized(void);
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index cb1dcce..e2849f8 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -175,6 +175,10 @@ bool qemu_socket_unselect(int sockfd, Error **errp);
* set errno based on WSAGetLastError()
*/
+#undef close
+#define close qemu_close_wrap
+int qemu_close_wrap(int fd);
+
#undef connect
#define connect qemu_connect_wrap
int qemu_connect_wrap(int sockfd, const struct sockaddr *addr,
@@ -206,10 +210,6 @@ int qemu_shutdown_wrap(int sockfd, int how);
#define ioctlsocket qemu_ioctlsocket_wrap
int qemu_ioctlsocket_wrap(int fd, int req, void *val);
-#undef closesocket
-#define closesocket qemu_closesocket_wrap
-int qemu_closesocket_wrap(int fd);
-
#undef getsockopt
#define getsockopt qemu_getsockopt_wrap
int qemu_getsockopt_wrap(int sockfd, int level, int optname,