summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-05-18 16:08:56 -0700
committerStephen Hemminger <shemminger@vyatta.com>2011-05-18 16:08:56 -0700
commit2a16118a2b99852472f8d6ec1d3d955e7efb580e (patch)
treeae23e65fcb26843a015de3d3db4adfae419589da
parent26a8656de086b649de834a80d07fd2b9ddcb593d (diff)
downloadrstp-2a16118a2b99852472f8d6ec1d3d955e7efb580e.tar.gz
Turn off compiler strict aliasing
The code does things like ntohs(*(unsigned short*) b->message_age) which break strict alias checking in gcc.
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4840a00..7da92b3 100644
--- 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