diff options
Diffstat (limited to 'tests/server/util.h')
-rw-r--r-- | tests/server/util.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tests/server/util.h b/tests/server/util.h index 140e349f3..76ca37140 100644 --- a/tests/server/util.h +++ b/tests/server/util.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -20,6 +20,8 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * + * SPDX-License-Identifier: curl + * ***************************************************************************/ #include "server_setup.h" @@ -40,7 +42,7 @@ extern const char *serverlogfile; extern const char *cmdfile; -#if defined(WIN32) || defined(_WIN32) +#ifdef WIN32 #include <process.h> #include <fcntl.h> @@ -49,12 +51,10 @@ extern const char *cmdfile; #undef perror #define perror(m) win32_perror(m) void win32_perror(const char *msg); -#endif /* WIN32 or _WIN32 */ -#ifdef USE_WINSOCK void win32_init(void); void win32_cleanup(void); -#endif /* USE_WINSOCK */ +#endif /* WIN32 */ /* fopens the test case file */ FILE *test2fopen(long testno); @@ -81,4 +81,16 @@ extern HANDLE exit_event; void install_signal_handlers(bool keep_sigalrm); void restore_signal_handlers(bool keep_sigalrm); +#ifdef USE_UNIX_SOCKETS + +#include <curl/curl.h> /* for curl_socket_t */ + +#ifdef HAVE_SYS_UN_H +#include <sys/un.h> /* for sockaddr_un */ +#endif /* HAVE_SYS_UN_H */ + +int bind_unix_socket(curl_socket_t sock, const char *unix_socket, + struct sockaddr_un *sau); +#endif /* USE_UNIX_SOCKETS */ + #endif /* HEADER_CURL_SERVER_UTIL_H */ |