diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-01-10 15:14:08 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-01-10 15:20:31 +0300 |
commit | a623db03b883812c6087130de8b314d0f80287b0 (patch) | |
tree | 5becab56bb6e27519e73f954f56ca7fc935564fb | |
parent | f8d5c77fa7b88b73fce2a2049b5d7f0e7755e301 (diff) | |
download | libmicrohttpd-a623db03b883812c6087130de8b314d0f80287b0.tar.gz libmicrohttpd-a623db03b883812c6087130de8b314d0f80287b0.zip |
Added support for GNU/kFreeBSD in sockets functions
-rw-r--r-- | src/microhttpd/mhd_sockets.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h index d09cc522..fb404891 100644 --- a/src/microhttpd/mhd_sockets.h +++ b/src/microhttpd/mhd_sockets.h | |||
@@ -126,7 +126,7 @@ typedef intptr_t ssize_t; | |||
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | 128 | ||
129 | #ifdef __FreeBSD__ | 129 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) |
130 | #include <sys/param.h> /* For __FreeBSD_version */ | 130 | #include <sys/param.h> /* For __FreeBSD_version */ |
131 | #endif /* __FreeBSD__ */ | 131 | #endif /* __FreeBSD__ */ |
132 | 132 | ||
@@ -204,7 +204,8 @@ typedef SOCKET MHD_socket; | |||
204 | # define USE_ACCEPT4 1 | 204 | # define USE_ACCEPT4 1 |
205 | #endif | 205 | #endif |
206 | 206 | ||
207 | #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ | 207 | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ |
208 | defined(__OpenBSD__) || defined(__NetBSD__) || \ | ||
208 | defined(MHD_WINSOCK_SOCKETS) || defined(__MACH__) || defined(__sun) || \ | 209 | defined(MHD_WINSOCK_SOCKETS) || defined(__MACH__) || defined(__sun) || \ |
209 | defined(SOMEBSD) | 210 | defined(SOMEBSD) |
210 | /* Most of OSes inherit nonblocking setting from the listen socket */ | 211 | /* Most of OSes inherit nonblocking setting from the listen socket */ |
@@ -248,8 +249,10 @@ typedef SOCKET MHD_socket; | |||
248 | */ | 249 | */ |
249 | #define _MHD_CORK_RESET_PUSH_DATA_ALWAYS 1 | 250 | #define _MHD_CORK_RESET_PUSH_DATA_ALWAYS 1 |
250 | #endif /* __linux__ */ | 251 | #endif /* __linux__ */ |
251 | #if defined(__FreeBSD__) && \ | 252 | #if (defined(__FreeBSD__) && \ |
252 | ((__FreeBSD__ + 0) >= 5 || (__FreeBSD_version + 0) >= 450000) | 253 | ((__FreeBSD__ + 0) >= 5 || (__FreeBSD_version + 0) >= 450000)) || \ |
254 | (defined(__FreeBSD_kernel_version) && \ | ||
255 | (__FreeBSD_kernel_version + 0) >= 450000) | ||
253 | /* FreeBSD pushes data to the network with reset of TCP_NOPUSH | 256 | /* FreeBSD pushes data to the network with reset of TCP_NOPUSH |
254 | * starting from version 4.5. */ | 257 | * starting from version 4.5. */ |
255 | /** | 258 | /** |