From adc5f128fcf3cb75b9130a7cc36e3681b1817284 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 17 Aug 2011 18:58:39 +0100 Subject: Allow mingw building (socket reading won't work yet) --- config.mk | 5 +++++ util.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config.mk b/config.mk index 2050380..0403026 100644 --- a/config.mk +++ b/config.mk @@ -15,4 +15,9 @@ CFLAGS = -ansi -pedantic -Wall -Wextra -Werror -g -D_POSIX_C_SOURCE=200112L \ CC = cc LDFLAGS = +# mingw +CC = gcc +CFLAGS = -ansi -Wall -DVERSION=\"$(VERSION)\" -DWINVER=0x0501 +LDFLAGS = -lws2_32 + LD = $(CC) diff --git a/util.c b/util.c index 6e341a5..1d7f9d0 100644 --- a/util.c +++ b/util.c @@ -3,10 +3,15 @@ #include #include #include +#include "util.h" +#ifndef WINVER #include #include #include -#include "util.h" +#else +#include +#include +#endif /* plundered from suckless' sic */ int dial(char *host, char *port) { -- cgit v1.2.3