]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
libio: Replace __LP64__ with __WORDSIZE
authorTulio Magno Quites Machado Filho <tuliom@redhat.com>
Thu, 30 Jan 2025 18:51:01 +0000 (15:51 -0300)
committerTulio Magno Quites Machado Filho <tuliom@redhat.com>
Wed, 5 Feb 2025 19:18:40 +0000 (16:18 -0300)
__LP64__ is a GCC extension and shouldn't be used in an installed
header.

Fixes: 596a61cf6b (libio: Start to return errors when flushing fwrite's buffer [BZ #29459], 2025-01-28)
Reported-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: Arjun Shankar <arjun@redhat.com>
libio/bits/types/struct_FILE.h

index 2012d7068110db1419d6e25dca293baf8439e623..ac99002ae7121b122f9b933de44e831e63757768 100644 (file)
@@ -32,6 +32,7 @@
 #endif
 
 #include <bits/types.h>
+#include <bits/wordsize.h>
 
 struct _IO_FILE;
 struct _IO_marker;
@@ -97,11 +98,11 @@ struct _IO_FILE_complete
   void *_freeres_buf;
   struct _IO_FILE **_prevchain;
   int _mode;
-#ifdef __LP64__
+#if __WORDSIZE == 64
   int _unused3;
 #endif
   __uint64_t _total_written;
-#ifndef __LP64__
+#if __WORDSIZE == 32
   int _unused3;
 #endif
   /* Make sure we don't get into trouble again.  */