aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 6d8d14d9..db99aa54 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -63,6 +63,7 @@
63#define WIN32_LEAN_AND_MEAN 1 63#define WIN32_LEAN_AND_MEAN 1
64#endif /* !WIN32_LEAN_AND_MEAN */ 64#endif /* !WIN32_LEAN_AND_MEAN */
65#include <windows.h> 65#include <windows.h>
66#include <process.h>
66#endif 67#endif
67 68
68#ifndef HAVE_ACCEPT4 69#ifndef HAVE_ACCEPT4
@@ -1110,11 +1111,11 @@ create_thread (MHD_thread_handle_ *thread,
1110 errno = EINVAL; 1111 errno = EINVAL;
1111 return ret; 1112 return ret;
1112#elif defined(MHD_USE_W32_THREADS) 1113#elif defined(MHD_USE_W32_THREADS)
1113 DWORD threadID; 1114 unsigned threadID;
1114 *thread = CreateThread(NULL, daemon->thread_stack_size, start_routine, 1115 *thread = (HANDLE)_beginthreadex(NULL, (unsigned)daemon->thread_stack_size, start_routine,
1115 arg, 0, &threadID); 1116 arg, 0, &threadID);
1116 if (NULL == (*thread)) 1117 if (NULL == (*thread))
1117 return EINVAL; 1118 return errno;
1118 1119
1119 W32_SetThreadName(threadID, "libmicrohttpd"); 1120 W32_SetThreadName(threadID, "libmicrohttpd");
1120 1121