diff -ur coreutils-5.2.1-orig/src/remove.c coreutils-5.2.1/src/remove.c --- coreutils-5.2.1-orig/src/remove.c 2003-11-09 07:31:51.000000000 +0000 +++ coreutils-5.2.1/src/remove.c 2005-09-18 12:57:49.000000000 +0100 @@ -765,7 +765,11 @@ unlink call. If FILENAME is a command-line argument, then dp is NULL, so we'll first try to unlink it. Using unlink here is ok, because it cannot remove a directory. */ - if ((dp && DT_IS_DIR (dp)) || is_dir == T_YES) + if ( +#if HAVE_STRUCT_DIRENT_D_TYPE + (dp && DT_IS_DIR (dp)) || +#endif + is_dir == T_YES) return RM_NONEMPTY_DIR; DO_UNLINK (filename, x);