This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

__have_no_stat64 undefined error in current cvs


I can't build the current glibc development cvs sources against Linux
kernel 2.3.41-pre2.

I made the following patch to get it to build.

Index: sysdeps/unix/sysv/linux/i386/fxstat.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/fxstat.c,v
retrieving revision 1.2
diff -u -r1.2 fxstat.c
--- sysdeps/unix/sysv/linux/i386/fxstat.c	2000/01/24 01:19:23	1.2
+++ sysdeps/unix/sysv/linux/i386/fxstat.c	2000/01/25 08:19:23
@@ -28,6 +28,7 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
+#include "kernel-features.h"
 
 #include <xstatconv.c>
 
@@ -53,10 +54,14 @@
       return INLINE_SYSCALL (fstat, 2, fd, (struct kernel_stat *) buf);
     }
 #if __ASSUME_STAT64_SYSCALL > 0
-  result = INLINE_SYSCALL (fstat64, 2, fd, &buf64);
-  if (result == 0)
-    result = xstat32_conv (vers, &buf64, buf);
-  return result;
+  {
+    struct stat64 buf64;
+
+    result = INLINE_SYSCALL (fstat64, 2, fd, &buf64);
+    if (result == 0)
+      result = xstat32_conv (vers, &buf64, buf);
+    return result;
+  }
 #else
 
 # if defined __NR_stat64
Index: sysdeps/unix/sysv/linux/i386/lxstat.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/wlxstat.c,v
retrieving revision 1.1
diff -u -r1.1 lxstat.c
--- sysdeps/unix/sysv/linux/i386/lxstat.c	2000/01/19 03:50:47	1.1
+++ sysdeps/unix/sysv/linux/i386/lxstat.c	2000/01/25 08:20:00
@@ -28,6 +28,7 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
+#include "kernel-features.h"
 
 #include <xstatconv.c>
 
@@ -55,10 +56,14 @@
     }
 
 #if __ASSUME_STAT64_SYSCALL > 0
-  result = INLINE_SYSCALL (lstat64, 2, name, &buf64);
-  if (result == 0)
-    result = xstat32_conv (vers, &buf64, buf);
-  return result;
+  {
+    struct stat64 buf64;
+
+    result = INLINE_SYSCALL (lstat64, 2, name, &buf64);
+    if (result == 0)
+      result = xstat32_conv (vers, &buf64, buf);
+    return result;
+  }
 #else
 
 # if defined __NR_stat64
Index: sysdeps/unix/sysv/linux/i386/xstat.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/i386/xstat.c,v
retrieving revision 1.2
diff -u -r1.2 xstat.c
--- sysdeps/unix/sysv/linux/i386/xstat.c	2000/01/19 03:49:11	1.2
+++ sysdeps/unix/sysv/linux/i386/xstat.c	2000/01/25 08:20:40
@@ -28,6 +28,7 @@
 
 #include <sysdep.h>
 #include <sys/syscall.h>
+#include "kernel-features.h"
 
 #include <xstatconv.c>
 
@@ -54,10 +55,14 @@
       return INLINE_SYSCALL (stat, 2, name, (struct kernel_stat *) buf);
     }
 #if __ASSUME_STAT64_SYSCALL > 0
-  result = INLINE_SYSCALL (stat64, 2, name, &buf64);
-  if (result == 0)
-    result = xstat32_conv (vers, &buf64, buf);
-  return result;
+  {
+    struct stat64 buf64;
+
+    result = INLINE_SYSCALL (stat64, 2, name, &buf64);
+    if (result == 0)
+      result = xstat32_conv (vers, &buf64, buf);
+    return result;
+  }
 #else
 # if defined __NR_stat64
   /* To support 32 bit UIDs, we have to use stat64.  The normal stat call only returns


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]