]> git.ipfire.org Git - people/ms/rstp.git/commitdiff
Turn off compiler strict aliasing
authorStephen Hemminger <shemminger@vyatta.com>
Wed, 18 May 2011 23:08:56 +0000 (16:08 -0700)
committerStephen Hemminger <shemminger@vyatta.com>
Wed, 18 May 2011 23:08:56 +0000 (16:08 -0700)
The code does things like ntohs(*(unsigned short*) b->message_age)
which break strict alias checking in gcc.

Makefile

index 4840a00cfbc6162d96949de426b09a0a8f04f3b5..7da92b344a458db462e056c5f5a6d3ebdd097f11 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@ CTLSOURCES = ctl_main.c ctl_cli_wrap.c ctl_socket_client.c
 CTLOBJECTS = $(CTLSOURCES:.c=.o)
 
 CC=gcc
-CFLAGS = -Wall -Werror -O2 -g -D_REENTRANT -D__LINUX__ -DVERSION=$(version) -DBUILD=$(build) -I. -I./include -I./rstplib
+CFLAGS = -Wall -Werror -fno-strict-aliasing -O2 -g -D_REENTRANT -D__LINUX__ \
+       -DVERSION=$(version) -DBUILD=$(build) -I. -I./include -I./rstplib
 
 all: rstpd rstpctl