Fix r_socket for mingw32
This commit is contained in:
parent
9266a3ae87
commit
0d192ca447
2 changed files with 5 additions and 0 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#endif
|
||||
#if __WIN32__ || MINGW32
|
||||
#include <winsock.h>
|
||||
typedef int socklen_t;
|
||||
#if __WIN32__ || __CYGWIN__ || MINGW32
|
||||
#undef USE_SOCKETS
|
||||
#define __WINDOWS__ 1
|
||||
|
|
|
|||
|
|
@ -4,5 +4,9 @@ NAME=r_socket
|
|||
OBJS=socket.o proc.o http.o http_server.o rap_server.o run.o
|
||||
DEPS=r_util
|
||||
|
||||
ifneq (,$(findstring mingw32,${OSTYPE}))
|
||||
LDFLAGS+=-lws2_32
|
||||
endif
|
||||
|
||||
include deps.mk
|
||||
include ../rules.mk
|
||||
|
|
|
|||
Loading…
Reference in a new issue