summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2009-02-19 00:51:12 +0000
committerabs <abs@pkgsrc.org>2009-02-19 00:51:12 +0000
commit44dc2856b0ebab4e8005a611a583fc94be9fc27c (patch)
tree0f12b66ff1c10d09a42c0d94a4e39a1818bf817b /pkgtools
parentac431e9fa595adee689224ecfbb8a865ca343cc3 (diff)
downloadpkgsrc-44dc2856b0ebab4e8005a611a583fc94be9fc27c.tar.gz
Fix PR 40151 - bootstrap of pkgsrc fails on Ubuntu 8.10
- At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite() http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 which means (void)fwrite(...) will *always* generate a warning, so set -Wno-error to bypass this in Linux.sys.mk - Ubuntu 8.1 also jumps through hoops to ensure ARG_MAX is *undefined*, so work around this in tnftp and libnbcompat
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk8
-rw-r--r--pkgtools/libnbcompat/files/nbcompat/param.h7
2 files changed, 13 insertions, 2 deletions
diff --git a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
index 1079052fb31..0bcd98621d3 100644
--- a/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
+++ b/pkgtools/bootstrap-mk-files/files/mods/Linux.sys.mk
@@ -1,10 +1,16 @@
-# $NetBSD: Linux.sys.mk,v 1.1.1.1 2006/07/14 23:13:01 jlam Exp $
+# $NetBSD: Linux.sys.mk,v 1.2 2009/02/19 00:51:12 abs Exp $
# NetBSD: sys.mk,v 1.58 2000/08/22 17:38:49 bjh21 Exp
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
unix?= We run Unix.
OS?= Linux
+# At least Ubuntu 8.1 sets __attribute__((warn_unused_result)) on fwrite()
+# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509
+.if !defined(NOGCCERROR)
+CFLAGS+= -Wno-error
+.endif
+
.SUFFIXES: .out .a .ln .o .s .S .c .cc .cpp .cxx .C .F .f .r .y .l .cl .p .h
.SUFFIXES: .sh .m4
diff --git a/pkgtools/libnbcompat/files/nbcompat/param.h b/pkgtools/libnbcompat/files/nbcompat/param.h
index 9b804a0fc16..296fe6e52fb 100644
--- a/pkgtools/libnbcompat/files/nbcompat/param.h
+++ b/pkgtools/libnbcompat/files/nbcompat/param.h
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.2 2008/04/29 05:46:08 martin Exp $ */
+/* $NetBSD: param.h,v 1.3 2009/02/19 00:51:12 abs Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -47,4 +47,9 @@
# define MAX(a, b) ((a) < (b) ? (b) : (a))
#endif
+/* At least Ubuntu 8.10 jumps through hoops to *undefine* ARG_MAX */
+#if !defined(ARG_MAX)
+# define ARG_MAX sysconf(_SC_ARG_MAX)
+#endif
+
#endif /* !_NBCOMPAT_SYS_PARAM_H_ */