summaryrefslogtreecommitdiff
path: root/net/libfetch
diff options
context:
space:
mode:
authormarino <marino@pkgsrc.org>2012-10-07 07:23:21 +0000
committermarino <marino@pkgsrc.org>2012-10-07 07:23:21 +0000
commite6c57cb60d163c777ce527fd342e8b2457f7b619 (patch)
treed2a8fc0ff4f8050c6765ebd50d9fe688b9b0874b /net/libfetch
parent73333883260aadb56080cd9e8ee432b00c7bff2b (diff)
downloadpkgsrc-e6c57cb60d163c777ce527fd342e8b2457f7b619.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/libfetch')
-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