$NetBSD$ --- src/lib/libast/features/fs.orig 2026-01-14 06:42:40.670523512 +0000 +++ src/lib/libast/features/fs @@ -107,7 +107,7 @@ lib statfs4 sys/types.h - sys/statfs.h - sys/vfs.h - s } }end -lib getmntinfo_statvfs note{ getmntinfo uses statvfs -- since when? }end compile{ +lib getmntinfo_statvfs note{ getmntinfo uses statvfs }end compile{ #include #include int @@ -118,45 +118,59 @@ lib getmntinfo_statvfs note{ getmntinfo uses statvfs - } }end -lib getfsstat_statvfs note{ getfsstat uses statvfs -- just in case it is confused like getmntinfo }end compile{ - #include - #if _sys_mount - #include - #endif - int - gfs(struct statvfs* fs) - { - fs->f_flag = 0; - return getfsstat(fs, sizeof(struct statvfs), MNT_WAIT); +if lib getfsstat_getvfsstat note{ getvfsstat (NetBSD) compiles }end compile{ + #include + #if _sys_statvfs + #include + #endif + int + gfs(struct statvfs* fs) + { + fs->f_flag = 0; + return getvfsstat(fs, sizeof(struct statvfs), ST_WAIT); + } + }end { + #define getfsstat getvfsstat + #define MNT_WAIT ST_WAIT + #define MNT_NOWAIT ST_NOWAIT + #define _lib_getfsstat 1 /* getfsstat() is actually getvfsstat() */ + #define _lib_getfsstat_statvfs 1 /* ...and it uses statvfs */ } -}end pass{ - cat < - #if _sys_mount - #include - #endif - #if _sys_param - #include - #endif - #if _sys_ucred - #include - #endif - int - gfs(struct statfs* fs) - { - fs->f_flags = 0; - return getfsstat(fs, sizeof(struct statfs), MNT_WAIT); +elif lib getfsstat_statvfs note{ getfsstat uses statvfs }end compile{ + #include + #if _sys_mount + #include + #endif + int + gfs(struct statvfs* fs) + { + fs->f_flag = 0; + return getfsstat(fs, sizeof(struct statvfs), MNT_WAIT); + } + }end { + #define _lib_getfsstat 1 /* getfsstat() uses statvfs */ } -}end pass{ - cat < + #if _sys_mount + #include + #endif + #if _sys_param + #include + #endif + #if _sys_ucred + #include + #endif + int + gfs(struct statfs* fs) + { + fs->f_flags = 0; + return getfsstat(fs, sizeof(struct statfs), MNT_WAIT); + } + }end { + #define _lib_getfsstat 1 /* getfsstat() uses statfs */ + } +endif cat{ #if _sys_statvfs