Просмотр исходного кода

mips: Fix struct stat st_size type for N32/N64

Use __off64_t for st_size in struct stat on MIPS N32/N64.

This matches the 64-bit off_t used by the ABI and prevents
incompatible pointer type errors when applications pass
&statbuf.st_size to functions expecting an off_t pointer.

Fixes builds of e2tools with MIPS64 N32.
Waldemar Brodkorb 2 дней назад
Родитель
Сommit
4d307481e2
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      libc/sysdeps/linux/mips/bits/stat.h

+ 1 - 1
libc/sysdeps/linux/mips/bits/stat.h

@@ -102,7 +102,7 @@ struct stat {
     __gid_t st_gid;		/* Group ID of the file's group.*/
     unsigned int st_rdev;	/* Device number, if device.  */
     int st_pad2[3];
-    __off_t st_size;		/* Size of file, in bytes.  */
+    __off64_t st_size;		/* Size of file, in bytes.  */
 #if defined(__USE_MISC) || defined(__USE_XOPEN2K8)
     /* Nanosecond resolution timestamps are stored in a format
        equivalent to 'struct timespec'.  This is the type used