Avoid unused function warning
If HAVE_SOCK_CLOEXEC is not defined, then sc_raw_socket_close() is never used. Add an #ifndef block to remove the warning.
This commit is contained in:
parent
6b9f397733
commit
37124e1452
1 changed files with 2 additions and 0 deletions
|
@ -83,6 +83,7 @@ unwrap(sc_socket socket) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_SOCK_CLOEXEC // avoid unused-function warning
|
||||||
static inline bool
|
static inline bool
|
||||||
sc_raw_socket_close(sc_raw_socket raw_sock) {
|
sc_raw_socket_close(sc_raw_socket raw_sock) {
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
@ -91,6 +92,7 @@ sc_raw_socket_close(sc_raw_socket raw_sock) {
|
||||||
return !closesocket(raw_sock);
|
return !closesocket(raw_sock);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SOCK_CLOEXEC
|
#ifndef HAVE_SOCK_CLOEXEC
|
||||||
// If SOCK_CLOEXEC does not exist, the flag must be set manually once the
|
// If SOCK_CLOEXEC does not exist, the flag must be set manually once the
|
||||||
|
|
Loading…
Reference in a new issue