dtfile makes use of ustat(2) on certain systems. This call has been
deprecated in glibc for a while and now, as of glibc-2.28, it has been
removed. The recommended replacement is to use statfs(2).
#include <sys/param.h>
#include <sys/mount.h>
#else
+#if defined(__linux__)
+#include <sys/vfs.h>
+#else
#include <ustat.h>
#endif
+#endif
#include <Xm/RowColumn.h>
#include <Xm/CascadeB.h>
return 0;
}
-#if !defined(CSRG_BASED)
+#if !defined(CSRG_BASED) && !defined(__linux__)
static int
FileSysType(
int dev)
return -2;
return u1.f_tinode;
}
+#else
+static int
+FileSysType(
+ int dev)
+{
+ struct statfs u1;
+ if(statfs(dev,&u1) < 0)
+ return -2;
+ return u1.f_ffree;
+}
#endif
static int
#include <sys/mount.h>
#include <pwd.h>
#include <fcntl.h>
-#if !defined(CSRG_BASED)
+#if !defined(CSRG_BASED) && !defined(__linux__)
#include <ustat.h>
#endif
+#if defined(__linux__)
+#include <sys/vfs.h>
+#endif
#include <dirent.h>
return ;
} /* end ImageInitialize */
-#if !defined(CSRG_BASED)
+#if !defined(CSRG_BASED) && !defined(__linux__)
static int
CopyFileSysType(
int dev)
return -2;
return u1.f_tinode;
}
+#else
+static int
+CopyFileSysType(
+ int dev)
+{
+ struct statfs u1;
+ if(statfs(dev,&u1) < 0)
+ return -2;
+ return u1.f_ffree;
+}
#endif
static int