mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
Handle #1529: add automatic linkage against ws2_32.lib on _WIN32 targets
This commit is contained in:
1 parent
944704a12d
commit
20fc8f0279
3 files changed
+3
-1
No files matched your search
@@ -25,7 +25,7 @@ mingw:
|
||||
vc98:
|
||||
$(VC98) cl.exe /nologo $(CFLAGS) ../../test/pack.c /Fepack.exe
|
||||
$(VC98) cmd /c 'pack.exe $(FILES_TO_EMBED) > packed_fs.c'
|
||||
$(VC98) cl.exe /nologo /O2 $(CFLAGS) $(SOURCES) ws2_32.lib -o $(PROG).exe
|
||||
$(VC98) cl.exe /nologo /O2 $(CFLAGS) $(SOURCES) /Fe$(PROG).exe
|
||||
$(VC98) $(PROG).exe
|
||||
|
||||
clean:
|
||||
|
||||
@@ -3102,6 +3102,7 @@ struct mg_connection *mg_sntp_connect(struct mg_mgr *mgr, const char *url,
|
||||
#define MG_SOCK_ERRNO WSAGetLastError()
|
||||
#ifndef SO_EXCLUSIVEADDRUSE
|
||||
#define SO_EXCLUSIVEADDRUSE ((int) (~SO_REUSEADDR))
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
#endif
|
||||
#elif MG_ARCH == MG_ARCH_FREERTOS_TCP
|
||||
#define MG_SOCK_ERRNO errno
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#define MG_SOCK_ERRNO WSAGetLastError()
|
||||
#ifndef SO_EXCLUSIVEADDRUSE
|
||||
#define SO_EXCLUSIVEADDRUSE ((int) (~SO_REUSEADDR))
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
#endif
|
||||
#elif MG_ARCH == MG_ARCH_FREERTOS_TCP
|
||||
#define MG_SOCK_ERRNO errno
|
||||
|
||||
Reference in new issue
Block a user