Skip to content

Commit

Permalink
MinGW fixes
Browse files Browse the repository at this point in the history
This fixes errors that started popping up after a reinstall of MinGW. Presumably, things changed in recent MinGW versions.
  • Loading branch information
tbuktu committed May 14, 2016
1 parent ee69a39 commit f4cd3de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
5 changes: 2 additions & 3 deletions Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ endif
ifeq ($(SSE), yes)
CFLAGS+=-mssse3
endif
LIBS+=-lrt
SRCDIR=src
TESTDIR=tests
LIB_OBJS=bitstring.o encparams.o hash.o idxgen.o key.o mgf.o ntru.o poly.o rand.o arith.o sha1.o sha2.o nist_ctr_drbg.o rijndael.o
Expand Down Expand Up @@ -96,12 +95,12 @@ test:

testham: clean lib $(TEST_OBJS_PATHS)
@echo CFLAGS=$(CFLAGS)
$(CC) $(CFLAGS) -o testham.exe $(TEST_OBJS_PATHS) $(LDFLAGS) -L. -llibntru -lm
$(CC) $(CFLAGS) -o testham.exe $(TEST_OBJS_PATHS) $(LDFLAGS) -L. -llibntru -lm -lws2_32

testnoham: CFLAGS += -DNTRU_AVOID_HAMMING_WT_PATENT
testnoham: clean lib $(TEST_OBJS_PATHS)
@echo CFLAGS=$(CFLAGS)
$(CC) $(CFLAGS) -o testnoham.exe $(TEST_OBJS_PATHS) $(LDFLAGS) -L. -llibntru -lm
$(CC) $(CFLAGS) -o testnoham.exe $(TEST_OBJS_PATHS) $(LDFLAGS) -L. -llibntru -lm -lws2_32

bench: lib
$(CC) $(CFLAGS) $(CPPFLAGS) -o bench $(SRCDIR)/bench.c $(LDFLAGS) -L. -llibntru
Expand Down
7 changes: 0 additions & 7 deletions src/bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ the_time->tv_nsec = mts.tv_nsec;

#define CLOCK_REALTIME 0

/* POSIX.1b structure for a time value. This is like a `struct timeval' but
has nanoseconds instead of microseconds. */
struct timespec {
uint32_t tv_sec; /* Seconds. */
uint32_t tv_nsec; /* Nanoseconds. */
};

LARGE_INTEGER getFILETIMEoffset()
{
SYSTEMTIME s;
Expand Down

0 comments on commit f4cd3de

Please sign in to comment.