diff --git a/ChangeLog b/ChangeLog index 6ae12cdd1..cd1c4b3cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-21 Roland Illig + + * configure.ac: Fixed detection of , statvfs() + and struct statvfs.f_fstypename, so that mc builds on NetBSD 3.0 + again. + 2006-04-18 Pavel Tsekov * acinclude.m4 (AC_GET_FS_INFO): Make it work again - the last diff --git a/configure.ac b/configure.ac index e76caad0c..a3f336310 100644 --- a/configure.ac +++ b/configure.ac @@ -158,7 +158,7 @@ AC_CHECK_HEADERS([unistd.h string.h memory.h grp.h limits.h malloc.h \ stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h sys/time.h \ sys/timeb.h sys/select.h sys/ioctl.h stropts.h arpa/inet.h \ security/pam_misc.h sys/socket.h sys/sysmacros.h sys/types.h \ - sys/mkdev.h wchar.h wctype.h]) + sys/mkdev.h wchar.h wctype.h sys/statvfs.h]) AC_HEADER_TIME AC_HEADER_SYS_WAIT @@ -167,6 +167,11 @@ AC_HEADER_STDC dnl Missing structure components AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev]) +AC_CHECK_MEMBERS([struct statvfs.f_fstypename],,, +[AC_INCLUDES_DEFAULT() +#ifdef HAVE_SYS_STATVFS_H +# include +#endif]) AC_STRUCT_ST_BLOCKS dnl @@ -180,7 +185,7 @@ AC_CHECK_FUNCS([\ initgroups isascii \ memcpy memmove memset \ putenv \ - setreuid setuid statfs strerror strftime sysconf \ + setreuid setuid statfs statvfs strerror strftime sysconf \ tcgetattr tcsetattr truncate \ ]) diff --git a/src/ChangeLog b/src/ChangeLog index aba38d4ae..9b8a38a56 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-21 Roland Illig + + * mountlist.c: Fixed so that it builds on NetBSD 3.0. + 2006-05-15 Pavel Tsekov * tty.h [USE_NCURSES]: Pull in term.h if WANT_TERM_H is defined. diff --git a/src/mountlist.c b/src/mountlist.c index 6fe5c0e0b..48cc8a2fb 100644 --- a/src/mountlist.c +++ b/src/mountlist.c @@ -119,6 +119,16 @@ # define HAVE_INFOMOUNT #endif +#if defined(HAVE_STATVFS) +# if defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME) +# define HAVE_F_FSTYPENAME +# endif +#else +# if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME) +# define HAVE_F_FSTYPENAME +# endif +#endif + /* A mount table entry. */ struct mount_entry { @@ -282,7 +292,11 @@ read_filesystem_list (int need_fs_type, int all_fs) #ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ { +#ifdef HAVE_STATVFS + struct statvfs *fsp; +#else struct statfs *fsp; +#endif int entries; entries = getmntinfo (&fsp, MNT_NOWAIT);