Fix build errors on Win32.

This commit is contained in:
Daniel Beer 2011-09-19 04:04:08 +12:00
parent a90a3ae86a
commit 9e42c1e6f4
2 changed files with 6 additions and 3 deletions

View File

@ -44,9 +44,11 @@ else
endif endif
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
MSPDEBUG_CC = gcc
WIN32_LIBS = -lws2_32 -lregex WIN32_LIBS = -lws2_32 -lregex
BINARY = mspdebug.exe BINARY = mspdebug.exe
else else
MSPDEBUG_CC = $(CC)
WIN32_LIBS = WIN32_LIBS =
BINARY = mspdebug BINARY = mspdebug
endif endif
@ -130,7 +132,7 @@ OBJ=\
ui/main.o ui/main.o
$(BINARY): $(OBJ) $(BINARY): $(OBJ)
$(CC) $(MSPDEBUG_LDFLAGS) -o $@ $^ $(MSPDEBUG_LIBS) $(MSPDEBUG_CC) $(MSPDEBUG_LDFLAGS) -o $@ $^ $(MSPDEBUG_LIBS)
.c.o: .c.o:
$(CC) $(MSPDEBUG_CFLAGS) -o $@ -c $*.c $(MSPDEBUG_CC) $(MSPDEBUG_CFLAGS) -o $@ -c $*.c

View File

@ -19,6 +19,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#include <usb.h> #include <usb.h>
#include "ti3410.h" #include "ti3410.h"
@ -520,7 +521,7 @@ static int download_firmware(struct usb_device *dev)
return -1; return -1;
printc_dbg("Waiting for TI3410 reset...\n"); printc_dbg("Waiting for TI3410 reset...\n");
sleep(2); usleep(2000000);
return 0; return 0;
} }