[Olsr-dev] [PATCH v1 3/3] olsr_switch: add -DNO_OLDNAMES to CFLAGS

Ferry Huberts (spam-protected)
Wed May 30 15:53:43 CEST 2012


From: Ferry Huberts <(spam-protected)>

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 <(spam-protected)>
---
 src/olsr_switch/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/olsr_switch/Makefile b/src/olsr_switch/Makefile
index 4bcaaac..d32f5be 100644
--- a/src/olsr_switch/Makefile
+++ b/src/olsr_switch/Makefile
@@ -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]
-- 
1.7.10.2





More information about the Olsr-dev mailing list