Menu

#4 patch for shfs 0.35 to fix various compile issues

open
nobody
None
5
2007-01-22
2007-01-22
No

Hi,
Here is a patch for shfs-0.35 I have put together based on various bits of information I have found around the Internet (including the shfs sourceforge page).

This patch appears to fix the following issues:
* fix for compiling with gcc 4 - based on code I found at: http://atrey.karlin.mff.cuni.cz/~qiq/src/shfs/shfs-0.35/gcc4-compilefix.patch
* fix for compiling with gcc 4.1.0 - based on code from a debian source package (shfs-source_0.35-6.1_all.deb)
* fix for shfs unmount segfault - based on code found in the shfs help forum
* fix for compiling with kernel 2.6.18 - I developed this patch myself, based on code found for other file systems.

I have attempted to set these changes up such that there is logic to determine if the new code is required or the old code is required. In *theory* this patch should allow you to compile with a wide variety of systems.

I have tested this patch on:
CentOS 4.4
kernel: 2.6.9-42.0.2.EL
gcc: gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)

SUSE 10.0
kernel: 2.6.13-15.11-default
gcc: gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)

SUSE 10.2
kernel: 2.6.18.2-34-default
gcc: gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux)

Discussion

  • David Bailey

    David Bailey - 2007-01-22

    patch to allow shfs 0.35 to compile with gcc 4 / 4.1.0, kernel 2.6.18 and fix unmount segfault. Sould also work with previous versions of gcc and kernel.

     
  • Nobody/Anonymous

    [root@localhost shfs-0.35]# patch -p1 <shfs_patch_20070121.diff
    patching file shfs/Linux-2.6/dcache.c
    patching file shfs/Linux-2.6/dir.c
    patching file shfs/Linux-2.6/inode.c
    patching file shfs/Linux-2.6/shfs_fs.h
    [root@localhost shfs-0.35]# make
    make[1]: Entering directory `/usr/local/src/shfs-0.35/shfs'
    make[2]: Entering directory `/usr/local/src/shfs-0.35/shfs/Linux-2.6'
    make -C //lib/modules/2.6.18-128.el5/build SUBDIRS=/usr/local/src/shfs-0.35/shfs/Linux-2.6 modules
    make[3]: Entering directory `/usr/src/kernels/2.6.18-128.el5-x86_64'
    CC [M] /usr/local/src/shfs-0.35/shfs/Linux-2.6/dcache.o
    CC [M] /usr/local/src/shfs-0.35/shfs/Linux-2.6/dir.o
    /usr/local/src/shfs-0.35/shfs/Linux-2.6/dir.c: In function ‘shfs_create’:
    /usr/local/src/shfs-0.35/shfs/Linux-2.6/dir.c:305: ошибка: ‘struct inode’ has no member named ‘u’
    /usr/local/src/shfs-0.35/shfs/Linux-2.6/dir.c:306: ошибка: ‘struct inode’ has no member named ‘u’
    make[4]: *** [/usr/local/src/shfs-0.35/shfs/Linux-2.6/dir.o] Ошибка 1
    make[3]: *** [_module_/usr/local/src/shfs-0.35/shfs/Linux-2.6] Ошибка 2
    make[3]: Leaving directory `/usr/src/kernels/2.6.18-128.el5-x86_64'
    make[2]: *** [default] Ошибка 2
    make[2]: Leaving directory `/usr/local/src/shfs-0.35/shfs/Linux-2.6'
    make[1]: *** [all] Ошибка 2
    make[1]: Leaving directory `/usr/local/src/shfs-0.35/shfs'
    make: *** [module] Ошибка 2
    [root@localhost shfs-0.35]# uname -a
    Linux localhost.localdomain 2.6.18-128.el5 #1 SMP Wed Jan 21 10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

    ???

     

Log in to post a comment.

MongoDB Logo MongoDB