diff mbox series

[uclibc-ng-devel] Missing f_flags in uclibc-ng version of struct statfs?

Message ID efe1f90f-192c-4438-4c70-081bc5f0541d@gentoo.org
State Accepted
Headers show
Series [uclibc-ng-devel] Missing f_flags in uclibc-ng version of struct statfs? | expand

Commit Message

Joshua Kinard Nov. 18, 2017, 5:48 p.m. UTC
I ran into a build failure on xfsprogs-4.13.1 under uclibc-ng-1.0.26 due to it
not finding the 'f_flags' member in 'struct statfs'.  Glibc has this member,
but not uclibc-ng.  Is this something going away, something yet to be added, or
something controlled by a CONFIG_* directive?

This is a diff of /usr/include/bits/statfs.h from a glibc root (a/) and a
uclibc-ng root (b/):

Comments

Waldemar Brodkorb Nov. 19, 2017, 7:32 a.m. UTC | #1
Hi Joshua,
Joshua Kinard wrote,

> I ran into a build failure on xfsprogs-4.13.1 under uclibc-ng-1.0.26 due to it
> not finding the 'f_flags' member in 'struct statfs'.  Glibc has this member,
> but not uclibc-ng.  Is this something going away, something yet to be added, or
> something controlled by a CONFIG_* directive?

No. I think it is just missing and might be added to be compatible
with glibc.

Could you sent a patch?

Looks like we have four files in the tree:
./libc/sysdeps/linux/common-generic/bits/statfs.h
./libc/sysdeps/linux/mips/bits/statfs.h
./libc/sysdeps/linux/common/bits/statfs.h
./libc/sysdeps/linux/alpha/bits/statfs.h

It seems common-generic for new architectures without
deprecated syscalls (arc, or1k) does already have f_flags
member.
 
best regards
 Waldemar
Waldemar Brodkorb Nov. 28, 2017, 6:35 p.m. UTC | #2
Hi Joshua,
Joshua Kinard wrote,

> I ran into a build failure on xfsprogs-4.13.1 under uclibc-ng-1.0.26 due to it
> not finding the 'f_flags' member in 'struct statfs'.  Glibc has this member,
> but not uclibc-ng.  Is this something going away, something yet to be added, or
> something controlled by a CONFIG_* directive?

In the meanwhile I added the missing member and released 1.0.27.
I hope it fixes your issue, I could compile xfsprogs 4.13
successfully.

best regards
 Waldemar
diff mbox series

Patch

--- a/usr/include/bits/statfs.h  2017-10-14 18:15:40.672366000 -0400
+++ b/usr/include/bits/statfs.h      2017-11-01 13:34:08.335874000 -0400
@@ -1,4 +1,4 @@ 
-/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.

    The GNU C Library is free software; you can redistribute it and/or
@@ -12,7 +12,7 @@ 
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library.  If not, see
+   License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */

 #ifndef _SYS_STATFS_H
@@ -44,8 +44,7 @@  struct statfs
        /* Linux specials */
     __fsid_t f_fsid;
     long int f_namelen;
-    long int f_flags;
-    long int f_spare[5];
+    long int f_spare[6];
   };

 #ifdef __USE_LARGEFILE64
@@ -64,8 +63,7 @@  struct statfs64
        /* Linux specials */
     __fsid_t f_fsid;
     long int f_namelen;
-    long int f_flags;
-    long int f_spare[5];
+    long int f_spare[6];
   };
 #endif