* fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
[gnulib.git] / m4 / rmdir-errno.m4
index 2907e7b..7693bc7 100644 (file)
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
 
 # Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -12,6 +12,7 @@
 # test runs a test to determine the actual numeric value.
 AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
 [dnl
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CACHE_CHECK([for rmdir-not-empty errno value],
     gl_cv_func_rmdir_errno_not_empty,
     [
@@ -21,6 +22,9 @@ AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY],
       AC_TRY_RUN([
 #include <stdio.h>
 #include <errno.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
        int main ()
        {
          FILE *s;