summaryrefslogtreecommitdiff
path: root/m4/chown.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-09-21 12:05:49 +0000
committerJim Meyering <jim@meyering.net>1998-09-21 12:05:49 +0000
commitcded303e29d62feb95e8cf075f4eb86a3be72d81 (patch)
treeeb7a42e96cdb9929374131e5dfac22705e3df227 /m4/chown.m4
parent050e7dcf7cb7afbf7971715416f5bbc058416879 (diff)
downloadcoreutils-cded303e29d62feb95e8cf075f4eb86a3be72d81.tar.xz
Declare locals: before, after. From Andries Brouwer.
Diffstat (limited to 'm4/chown.m4')
-rw-r--r--m4/chown.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/chown.m4 b/m4/chown.m4
index 1fb6203e9..ed6504747 100644
--- a/m4/chown.m4
+++ b/m4/chown.m4
@@ -1,4 +1,4 @@
-#serial 2
+#serial 3
dnl From Jim Meyering.
dnl Determine whether chown accepts arguments of -1 for uid and gid.
@@ -17,7 +17,7 @@ AC_DEFUN(jm_FUNC_CHOWN,
AC_CACHE_CHECK([for working chown], jm_cv_func_working_chown,
[AC_TRY_RUN([
# include <sys/types.h>
-# include <stat.h>
+# include <sys/stat.h>
# include <fcntl.h>
# ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -27,6 +27,8 @@ AC_DEFUN(jm_FUNC_CHOWN,
main ()
{
char *f = "conftestchown";
+ struct stat before, after;
+
if (creat (f, 0600) < 0)
exit (1);
if (stat (f, &before) < 0)