mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
Unbreak mac build
This commit is contained in:
1 parent
30126072dc
commit
6c14c7d623
2 files changed
+4
-2
No files matched your search
+2
-1
@@ -3858,6 +3858,7 @@ struct mg_connection *mg_sntp_connect(struct mg_mgr *mgr, const char *url,
|
||||
|
||||
#if MG_ENABLE_SOCKET
|
||||
#if MG_ARCH == MG_ARCH_WIN32 && MG_ENABLE_WINSOCK
|
||||
typedef unsigned long nfds_t;
|
||||
#define MG_SOCK_ERRNO WSAGetLastError()
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
@@ -4366,7 +4367,7 @@ static void mg_iotest(struct mg_mgr *mgr, int ms) {
|
||||
eSELECT_READ | eSELECT_EXCEPT | eSELECT_WRITE);
|
||||
}
|
||||
#elif MG_ENABLE_POLL
|
||||
unsigned long n = 0;
|
||||
nfds_t n = 0;
|
||||
for (struct mg_connection *c = mgr->conns; c != NULL; c = c->next) n++;
|
||||
struct pollfd *fds = (struct pollfd *) alloca(n * sizeof(fds[0]));
|
||||
if (n > 0) memset(fds, 0, sizeof(n * sizeof(fds[0])));
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@
|
||||
|
||||
#if MG_ENABLE_SOCKET
|
||||
#if MG_ARCH == MG_ARCH_WIN32 && MG_ENABLE_WINSOCK
|
||||
typedef unsigned long nfds_t;
|
||||
#define MG_SOCK_ERRNO WSAGetLastError()
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
@@ -518,7 +519,7 @@ static void mg_iotest(struct mg_mgr *mgr, int ms) {
|
||||
eSELECT_READ | eSELECT_EXCEPT | eSELECT_WRITE);
|
||||
}
|
||||
#elif MG_ENABLE_POLL
|
||||
unsigned long n = 0;
|
||||
nfds_t n = 0;
|
||||
for (struct mg_connection *c = mgr->conns; c != NULL; c = c->next) n++;
|
||||
struct pollfd *fds = (struct pollfd *) alloca(n * sizeof(fds[0]));
|
||||
if (n > 0) memset(fds, 0, sizeof(n * sizeof(fds[0])));
|
||||
|
||||
Reference in new issue
Block a user