From 2a16118a2b99852472f8d6ec1d3d955e7efb580e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 18 May 2011 16:08:56 -0700 Subject: [PATCH] Turn off compiler strict aliasing The code does things like ntohs(*(unsigned short*) b->message_age) which break strict alias checking in gcc. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3