aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/makefs
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2007-12-17 11:03:38 +0800
committerimp <imp@FreeBSD.org>2007-12-17 11:03:38 +0800
commit5896d463431b2e8772e457f67b3bb47ac8d9391c (patch)
tree89337aac75ddaac1c6f6593f75dbc52dcf635e48 /sysutils/makefs
parent2bbd3df57934baa5b551cdd7b6fd1a42609f0720 (diff)
downloadfreebsd-ports-gnome-5896d463431b2e8772e457f67b3bb47ac8d9391c.tar.gz
freebsd-ports-gnome-5896d463431b2e8772e457f67b3bb47ac8d9391c.tar.zst
freebsd-ports-gnome-5896d463431b2e8772e457f67b3bb47ac8d9391c.zip
Gcc 4.2 doesn't like expressions of the form (a ? b : c) = 12; so we
code it in a less obscure way. I did this as a patch to the original, but I don't know if the original will ever be updated. This is a hack to make it work well enough for me to use it.
Diffstat (limited to 'sysutils/makefs')
-rw-r--r--sysutils/makefs/Makefile4
-rw-r--r--sysutils/makefs/files/patch-usr.bin-makefs-ffs-ffs_alloc.c14
2 files changed, 14 insertions, 4 deletions
diff --git a/sysutils/makefs/Makefile b/sysutils/makefs/Makefile
index 398bc5d39ba2..a227eef5160c 100644
--- a/sysutils/makefs/Makefile
+++ b/sysutils/makefs/Makefile
@@ -18,10 +18,6 @@ PLIST_FILES= sbin/makefs
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 700042
-BROKEN= Broken with gcc 4.2
-.endif
-
do-build:
cd ${WRKSRC} && ${SH} -xe build.sh
diff --git a/sysutils/makefs/files/patch-usr.bin-makefs-ffs-ffs_alloc.c b/sysutils/makefs/files/patch-usr.bin-makefs-ffs-ffs_alloc.c
new file mode 100644
index 000000000000..1fcc2c6674ad
--- /dev/null
+++ b/sysutils/makefs/files/patch-usr.bin-makefs-ffs-ffs_alloc.c
@@ -0,0 +1,14 @@
+--- ./netbsdsrc/usr.sbin/makefs/ffs/ffs_alloc.c~ 2004-07-04 23:17:39.000000000 -0600
++++ ./netbsdsrc/usr.sbin/makefs/ffs/ffs_alloc.c 2007-12-16 19:44:22.000000000 -0700
+@@ -120,7 +120,10 @@
+ cg = dtog(fs, bpref);
+ bno = ffs_hashalloc(ip, cg, bpref, size, ffs_alloccg);
+ if (bno > 0) {
+- DIP(ip, blocks) += size / DEV_BSIZE;
++ if (ip->i_fs->fs_magic == FS_UFS1_MAGIC)
++ ip->i_ffs1_blocks += size / DEV_BSIZE;
++ else
++ ip->i_ffs1_blocks += size / DEV_BSIZE;
+ *bnp = bno;
+ return (0);
+ }