summaryrefslogtreecommitdiff
path: root/src/h2.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-11-26 15:17:02 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:34 -0400
commitabaf0a5f4d17206340f54420558fc7dfaae62e4f (patch)
tree10c041f2a1edc46e31424dde903d15b599c9b564 /src/h2.c
parent9b9dd8efafbf74b173f7d79f791b0736c797900f (diff)
downloadlighttpd-git-abaf0a5f4d17206340f54420558fc7dfaae62e4f.tar.gz
[core] _WIN32 socket-compat, filesystem-compat
_WIN32 is sufficiently different -- *different*; not better -- that isolating _WIN32 code is clearer than #ifdef _WIN32 in almost every func in fdevent.c _WIN32-specific fdevent_socket_* funcs _WIN32 SOCKET fds must be closed with closesocket(), not close() _WIN32 HANDLE_FLAG_INHERIT for FD_CLOEXEC _WIN32 use _sopen_s() without _O_TEMPORARY Use _sopen_s() without _O_TEMPORARY in fdevent_mkostemp(). _O_TEMPORARY would remove file once last handle to file is closed. Temporary files in chunkqueue may be closed for large request/response _WIN32 fdevent_rename() using MoveFileExA _WIN32 rename() fails if the target file already exists. Alternatives are MoveFileExA() or ReplaceFileA(). Both of the above fail if either oldfile or newfile are open, so - not atomic - may fail sporadically
Diffstat (limited to 'src/h2.c')
-rw-r--r--src/h2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/h2.c b/src/h2.c
index 5b5cd0fb..6cabadaf 100644
--- a/src/h2.c
+++ b/src/h2.c
@@ -7,7 +7,11 @@
#include "first.h"
#include "h2.h"
+#ifndef _WIN32
#include <arpa/inet.h> /* htonl() */
+#else
+#include <winsock2.h> /* htonl() */
+#endif
#include <stdint.h> /* INT32_MAX INT32_MIN */
#include <stdlib.h>
#include <string.h>