[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #16325] Fixes needed to build coreutils on Interix (SFU or SUA)

From: Eric Blake
Subject: [bug #16325] Fixes needed to build coreutils on Interix (SFU or SUA)
Date: Mon, 17 Apr 2006 08:48:35 -0600
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

Follow-up Comment #5, bug #16325 (project coreutils):

Unfortunately, Paul's patch broke compilation on cygwin (and I'm assuming
Linux, too, since cygwin modeled their statvfs after linux), where struct
statvfs does not have an f_type member; only struct statfs:

if gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I. -I..  -I.. -I. -I../lib -I../lib  
-g2 -Wall -Werror -MT stat.o -MD -MP -MF ".deps/stat.Tpo" -c -o stat.o
stat.c; \
then mv -f ".deps/stat.Tpo" ".deps/stat.Po"; else rm -f ".deps/stat.Tpo";
exit 1; fi
stat.c: In function `human_fstype':
stat.c:147: error: structure has no member named `f_type'
stat.c:284: error: structure has no member named `f_type'
make[3]: *** [stat.o] Error 1

This followup patch fixes the issue for me, although I'm not sure it is the
correct approach:

2006-04-17  Eric Blake  <address@hidden>

        * src/stat.c (USE_STATVFS): Define to 0 if f_type is needed, but
        statvfs.f_type not present.

Index: src/stat.c
RCS file: /sources/coreutils/coreutils/src/stat.c,v
retrieving revision 1.92
diff -u -r1.92 stat.c
--- src/stat.c  12 Apr 2006 20:14:42 -0000      1.92
+++ src/stat.c  17 Apr 2006 14:45:04 -0000
@@ -20,7 +20,9 @@
 #include <config.h>
+             && HAVE_STRUCT_STATVFS_F_TYPE)))
 # define USE_STATVFS 1
 # define USE_STATVFS 0
@@ -135,7 +137,7 @@
 static char const *trailing_delim = "";
 /* Return the type of the specified file system.
-   Some systems have statfvs.f_basetype[FSTYPSZ]. (AIX, HP-UX, and Solaris)
+   Some systems have statvfs.f_basetype[FSTYPSZ]. (AIX, HP-UX, and Solaris)
    Others have statfs.f_fstypename[MFSNAMELEN]. (NetBSD 1.5.2)
    Still others have neither and have to get by with f_type (Linux).  */
 static char const *


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]