Fix build of fs/ufs/namei.c (was: Linux 2.6.0-test5: ufs build fails)
PATCH 1/1 Fix build of fs/ufs/namei.c (was: Linux 2.6.0-test5: ufs build fails)
Von Eyal Lebedinsky:
Quoted 12 lines
allmodconfig on i386:
CC [M]
fs/ufs/namei.ofs/ufs/namei.c: In function `ufs_mknod':fs/ufs/namei.c:119: parse error beforeint' fs/ufs/namei.c:127:err' undeclared (first use in this function)fs/ufs/namei.c:127: (Each undeclared identifier is reported only oncefs/ufs/namei.c:127: for each function it appears in.)fs/ufs/namei.c:131: warning: control reaches end of non-void function make[2]: *** [fs/ufs/namei.o] Error 1
make[1]: *** [fs/ufs] Error 2
make: *** [fs] Error 2
Your gcc doesn't like declarations after code I think. Try attached patch.
Eike
fs/ufs/namei.c +3 -1
@@ -113,10 +113,12 @@static int ufs_mknod (struct inode * dir,struct dentry *dentry,int mode,dev_t rdev) {struct inode * inode; +int err; +if (!old_valid_dev (rdev))return -EINVAL ; inode =ufs_new_inode (dir, mode); -int err =PTR_ERR (inode); + err =PTR_ERR (inode);if (!IS_ERR (inode)) {init_special_inode (inode, mode, rdev);/* NOTE: that'll go when we get wide dev_t */