diff --git a/cde/programs/dtfile/Trash.c b/cde/programs/dtfile/Trash.c index d391cccdb..61f30fbb2 100644 --- a/cde/programs/dtfile/Trash.c +++ b/cde/programs/dtfile/Trash.c @@ -106,8 +106,12 @@ #include #include #else +#if defined(__linux__) +#include +#else #include #endif +#endif #include #include @@ -4264,7 +4268,7 @@ CheckDeletePermissionRecur( return 0; } -#if !defined(CSRG_BASED) +#if !defined(CSRG_BASED) && !defined(__linux__) static int FileSysType( int dev) @@ -4274,6 +4278,16 @@ FileSysType( 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 diff --git a/cde/programs/dtfile/dtcopy/sharedFuncs.c b/cde/programs/dtfile/dtcopy/sharedFuncs.c index b3a0e9518..31b1ca51b 100644 --- a/cde/programs/dtfile/dtcopy/sharedFuncs.c +++ b/cde/programs/dtfile/dtcopy/sharedFuncs.c @@ -63,9 +63,12 @@ #include #include #include -#if !defined(CSRG_BASED) +#if !defined(CSRG_BASED) && !defined(__linux__) #include #endif +#if defined(__linux__) +#include +#endif #include @@ -358,7 +361,7 @@ ImageInitialize( Display *display ) return ; } /* end ImageInitialize */ -#if !defined(CSRG_BASED) +#if !defined(CSRG_BASED) && !defined(__linux__) static int CopyFileSysType( int dev) @@ -368,6 +371,16 @@ CopyFileSysType( 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