aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-04-28 21:40:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-04-28 21:40:02 +0000
commit820126cf969b4e6379bea4c69020525a1f19d01c (patch)
tree5668bf01caed3670f2e03764d126057765e28465 /package
parent3607094a5bcb52abc4d0902e38aa256ed2e80504 (diff)
downloadupstream-820126cf969b4e6379bea4c69020525a1f19d01c.tar.gz
upstream-820126cf969b4e6379bea4c69020525a1f19d01c.tar.bz2
upstream-820126cf969b4e6379bea4c69020525a1f19d01c.zip
fix nfs-server with gcc 3.4
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@751 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/nfs-server/patches/gcc-3.4-fix.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/package/nfs-server/patches/gcc-3.4-fix.patch b/package/nfs-server/patches/gcc-3.4-fix.patch
new file mode 100644
index 0000000000..21915ce497
--- /dev/null
+++ b/package/nfs-server/patches/gcc-3.4-fix.patch
@@ -0,0 +1,24 @@
+diff -urN nfs-server-2.2beta47.old/fh.c nfs-server-2.2beta47.dev/fh.c
+--- nfs-server-2.2beta47.old/fh.c 2005-04-29 00:37:48.000000000 +0200
++++ nfs-server-2.2beta47.dev/fh.c 2005-04-29 00:39:44.000000000 +0200
+@@ -351,13 +351,13 @@
+ #ifndef ENABLE_DEVTAB
+ psi_t dmajor, dminor;
+
+-#if (SIZEOF_DEV_T == 4)
+- /* This folds the upper 16 bits into bits 8..15, and
+- * the lower 16 bits into bits 0..7
+- */
+- dev = (((dev >> 16) & 0xff00) ^ ((dev >> 8) & 0xff00)) |
+- (((dev >> 8) & 0xff) ^ (dev & 0xff));
+-#endif
++ if (sizeof(dev_t) == 4) {
++ /* This folds the upper 16 bits into bits 8..15, and
++ * the lower 16 bits into bits 0..7
++ */
++ dev = (((dev >> 16) & 0xff00) ^ ((dev >> 8) & 0xff00)) |
++ (((dev >> 8) & 0xff) ^ (dev & 0xff));
++ }
+
+ /*
+ * Assuming major and minor numbers are small integers,