olsr_switch: add -DNO_OLDNAMES to CFLAGS
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 30 May 2012 13:42:26 +0000 (15:42 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 31 May 2012 19:39:05 +0000 (21:39 +0200)
To make mingw cross compilation on Fedora 17 work.

[CC] ohs_cmd.c
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/sys/stat.h:14:0,
                 from ohs_cmd.c:54:
/usr/i686-w64-mingw32/sys-root/mingw/include/io.h:313:15: error: conflicting types for 'closesocket'
In file included from ../../src/olsr_types.h:90:0,
                 from olsr_host_switch.h:45,
                 from ohs_cmd.c:42:
/usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:998:34: note: previous declaration of 'closesocket' was here
make: *** [ohs_cmd.o] Error 1
make: *** [switch] Error 2

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/olsr_switch/Makefile

index 4bcaaac..d32f5be 100644 (file)
@@ -14,7 +14,7 @@ $(TOPDIR)/$(BINNAME): $(OBJS)
        @echo "[LD] $@"
        @$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
-ohs_cmd.o: CFLAGS += -Wno-cast-qual
+ohs_cmd.o: CFLAGS += -Wno-cast-qual -DNO_OLDNAMES
 
 clean:
        rm -f *.[od]