Hi there,
if you also have problems compiling 2.5.5x, then your compiler is
too old as is mine.
Anyway, since I don't like to upgrade now, I hacked the offending
file fs/readdir.c and can compile a kernel again ;-)
Have fun!
Ingo Oeser
diff -Naur linux-2.5.53-mm2/fs/readdir.c linux-2.5.53-mm2-ioe/fs/readdir.c
--- linux-2.5.53-mm2/fs/readdir.c Fri Dec 27 13:49:53 2002
+++ linux-2.5.53-mm2-ioe/fs/readdir.c Mon Dec 30 21:51:53 2002
@@ -134,18 +134,18 @@
return -EINVAL;
dirent = buf->previous;
if (dirent) {
- if (__put_user(offset, &dirent->d_off))
+ if (put_user(offset, &dirent->d_off))
goto efault;
}
dirent = buf->current_dir;
buf->previous = dirent;
- if (__put_user(ino, &dirent->d_ino))
+ if (put_user(ino, &dirent->d_ino))
goto efault;
- if (__put_user(reclen, &dirent->d_reclen))
+ if (put_user(reclen, &dirent->d_reclen))
goto efault;
if (copy_to_user(dirent->d_name, name, namlen))
goto efault;
- if (__put_user(0, dirent->d_name + namlen))
+ if (put_user(0, dirent->d_name + namlen))
goto efault;
((char *) dirent) += reclen;
buf->current_dir = dirent;
@@ -226,22 +226,22 @@
return -EINVAL;
dirent = buf->previous;
if (dirent) {
- if (__put_user(offset, &dirent->d_off))
+ if (put_user(offset, &dirent->d_off))
goto efault;
}
dirent = buf->current_dir;
buf->previous = dirent;
- if (__put_user(ino, &dirent->d_ino))
+ if (put_user(ino, &dirent->d_ino))
goto efault;
- if (__put_user(0, &dirent->d_off))
+ if (put_user(0, &dirent->d_off))
goto efault;
- if (__put_user(reclen, &dirent->d_reclen))
+ if (put_user(reclen, &dirent->d_reclen))
goto efault;
- if (__put_user(d_type, &dirent->d_type))
+ if (put_user(d_type, &dirent->d_type))
goto efault;
if (copy_to_user(dirent->d_name, name, namlen))
goto efault;
- if (__put_user(0, dirent->d_name + namlen))
+ if (put_user(0, dirent->d_name + namlen))
goto efault;
((char *) dirent) += reclen;
buf->current_dir = dirent;
@@ -280,7 +280,9 @@
if (lastdirent) {
struct linux_dirent64 d;
d.d_off = file->f_pos;
- __put_user(d.d_off, &lastdirent->d_off);
+ error = -EFAULT;
+ if (put_user(d.d_off, &lastdirent->d_off))
+ goto out;
error = count - buf.count;
}
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth