diff options
author | Max Kellermann <max@duempel.org> | 2011-09-19 21:04:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-20 08:38:58 +0200 |
commit | c476819cb1186770b1b7395851e394caac39cbc8 (patch) | |
tree | 7e2d236e71ac88238026bb8803bfa87121c00f1d /src/fd_util.h | |
parent | 77a56c7c5a1ab6bc0d76e0cf55f24071be7c4b5f (diff) | |
download | mpd-c476819cb1186770b1b7395851e394caac39cbc8.tar.gz mpd-c476819cb1186770b1b7395851e394caac39cbc8.tar.xz mpd-c476819cb1186770b1b7395851e394caac39cbc8.zip |
fd_util: add function close_socket()
Wrap close(), use closesocket() on WIN32/WinSock.
Diffstat (limited to 'src/fd_util.h')
-rw-r--r-- | src/fd_util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fd_util.h b/src/fd_util.h index 3d465b200..d74bb30d8 100644 --- a/src/fd_util.h +++ b/src/fd_util.h @@ -133,4 +133,10 @@ inotify_init_cloexec(void); #endif +/** + * Portable wrapper for close(); use closesocket() on WIN32/WinSock. + */ +int +close_socket(int fd); + #endif |