diff --git a/Makefile.win b/Makefile.win index c1f788f906..f02a6d15ca 100644 --- a/Makefile.win +++ b/Makefile.win @@ -35,6 +35,7 @@ HAVE_SDL = 1 HAVE_OPENGL = 1 HAVE_DYLIB = 1 HAVE_NETPLAY = 1 +HAVE_STDIN_CMD = 1 HAVE_THREADS = 1 DYNAMIC = 1 @@ -114,9 +115,14 @@ ifeq ($(HAVE_DYLIB), 1) DEFINES += -DHAVE_DYLIB endif +ifeq ($(HAVE_STDIN_CMD), 1) + DEFINES += -DHAVE_COMMAND -DHAVE_STDIN_CMD + OBJ += command.o +endif + ifeq ($(HAVE_NETPLAY), 1) - DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD -DHAVE_COMMAND - OBJ += netplay.o command.o + DEFINES += -DHAVE_NETPLAY -DHAVE_NETWORK_CMD + OBJ += netplay.o LIBS += -lws2_32 endif diff --git a/command.c b/command.c index 91b5288b0b..06f32c110f 100644 --- a/command.c +++ b/command.c @@ -267,8 +267,7 @@ static size_t read_stdin(char *buf, size_t size) avail = size; DWORD has_read = 0; - ret = ReadFile(hnd, buf, avail, &has_read, NULL); - if (!ret) + if (!ReadFile(hnd, buf, avail, &has_read, NULL)) return 0; return has_read;