summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authormarino <marino>2012-10-07 07:23:21 +0000
committermarino <marino>2012-10-07 07:23:21 +0000
commitfd4797f05f05716110e3011eaab34a6b864466b5 (patch)
treed2a8fc0ff4f8050c6765ebd50d9fe688b9b0874b /net
parente38b75a23652eba85ee617d59b14dfda1369f1c2 (diff)
downloadpkgsrc-fd4797f05f05716110e3011eaab34a6b864466b5.tar.gz
net/libfetch: Fix for gcc4.7
When building with gcc4.7, libfetch fails with the following error: ftp.c: In function 'unmappedaddr': ftp.c:149:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] cc1: all warnings being treated as errors *** Error code 1 The code is intentionally grouping an array of four uint8_t bytes into a uint32_t word. Add -Wno-strict-aliasing in makefile to fix build in gcc4.7.
Diffstat (limited to 'net')
-rw-r--r--net/libfetch/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/libfetch/Makefile b/net/libfetch/Makefile
index 983bb13a9ec..4cda7e526f4 100644
--- a/net/libfetch/Makefile
+++ b/net/libfetch/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2011/12/17 00:12:29 sbd Exp $
+# $NetBSD: Makefile,v 1.42 2012/10/07 07:23:21 marino Exp $
#
DISTNAME= libfetch-2.33
@@ -19,6 +19,11 @@ USE_BSD_MAKEFILE= yes
MAKE_JOBS_SAFE= NO
+# GCC4.7 detects the intentional type-punned pointer dereference on ftp.c:149
+# libfetch is built with -Werror, so this strict-alias rule violation breaks
+# the build. Disable the check.
+CFLAGS+= -Wno-strict-aliasing
+
.include "../../mk/bsd.prefs.mk"
.if !empty(FETCH_USING:Mfetch)
CHECK_PERMS= no