summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-fs/unionfs/files')
-rw-r--r--sys-fs/unionfs/files/1.3-64bit_compile_fix.diff48
1 files changed, 48 insertions, 0 deletions
diff --git a/sys-fs/unionfs/files/1.3-64bit_compile_fix.diff b/sys-fs/unionfs/files/1.3-64bit_compile_fix.diff
new file mode 100644
index 000000000000..8f8870ab0ba2
--- /dev/null
+++ b/sys-fs/unionfs/files/1.3-64bit_compile_fix.diff
@@ -0,0 +1,48 @@
+Index: super.c
+===================================================================
+RCS file: /home/cvs/unionfs/unionfs/super.c,v
+retrieving revision 1.98
+diff -u -p -r1.98 super.c
+--- super.c 5 Aug 2006 01:28:46 -0000 1.98
++++ super.c 10 Aug 2006 01:01:10 -0000
+@@ -684,18 +684,22 @@ enum {
+ static void do_decode(__u32 * fh, struct dentry **hidden_root,
+ ino_t * hidden_ino, ino_t * hidden_parent_ino)
+ {
+- *hidden_root = (void *)fh[FhHRoot2];
++ unsigned long root;
++
++ root = fh[FhHRoot2];
+ *hidden_ino = fh[FhHIno2];
+ *hidden_parent_ino = fh[FhHPIno2];
+ #if BITS_PER_LONG == 64
+- *hidden_root |= fh[FhHRoot1] << 32;
+- *hidden_ino |= fh[FhHIno1] << 32;
+- *hidden_parent_ino |= fh[FhHPIno1] << 32;
++ root |= ((unsigned long)fh[FhHRoot1]) << 32;
++ *hidden_ino |= ((unsigned long) fh[FhHIno1]) << 32;
++ *hidden_parent_ino |= ((unsigned long) fh[FhHPIno1]) << 32;
+ #elif BITS_PER_LONG == 32
+ /* ok */
+ #else
+ #error unknown size
+ #endif
++
++ *hidden_root = (struct dentry*) root;
+ }
+
+ static int unionfs_encode_fh(struct dentry *dentry, __u32 * fh, int *max_len,
+@@ -739,11 +743,11 @@ static int unionfs_encode_fh(struct dent
+ unlock_dentry(sb->s_root);
+ h_ino = itohi_index(dentry->d_inode, bindex)->i_ino;
+ hp_ino = parent_ino(dtohd(dentry));
+- fh[FhHRoot2] = (__u32) h_root;
++ fh[FhHRoot2] = (unsigned long) h_root;
+ fh[FhHIno2] = h_ino;
+ fh[FhHPIno2] = hp_ino;
+ #if BITS_PER_LONG == 64
+- fh[FhHRoot1] = h_root >> 32;
++ fh[FhHRoot1] = ((unsigned long) h_root) >> 32;
+ fh[FhHIno1] = h_ino >> 32;
+ fh[FhHPIno1] = hp_ino >> 32;
+ #endif