chiark / gitweb /
bugfix: -fno-strict-aliasing, because tun.c breaks the rules.
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 19 Jun 2011 08:08:16 +0000 (09:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 26 Jun 2011 11:07:26 +0000 (12:07 +0100)
(What it does is: fills in 'struct sockaddr' fields of 'struct
rtentry' by casting to 'struct sockaddr_in' pointers and accessing
through those.  A more intrusive change would be to construct the
sockaddr_in in another object and then memcpy it into place, which
would achieve the same effect without (AFAIK) breaching C's aliasing
rules.)

Signed-off-by: Richard Kettlewell <richard@greenend.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile.in

index 30ce8f6..52aaaa5 100644 (file)
@@ -39,7 +39,8 @@ CFLAGS:=-Wall @WRITESTRINGS@ @CFLAGS@ \
        -Wno-pointer-sign -Wstrict-prototypes -Wmissing-prototypes \
        -Wmissing-declarations -Wnested-externs -Wredundant-decls \
        -Wpointer-arith -Wformat=2 -Winit-self \
-       -Wswitch-enum -Wunused-variable -Wbad-function-cast
+       -Wswitch-enum -Wunused-variable -Wbad-function-cast \
+       -Wno-strict-aliasing -fno-strict-aliasing
 ALL_CFLAGS:=@DEFS@ -I$(srcdir) -I. $(CFLAGS)
 CPPFLAGS:=@CPPFLAGS@
 LDFLAGS:=@LDFLAGS@