aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-02-08 09:28:51 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-02-08 09:28:51 +0000
commit031090eb8eca0e1e3b4f14bd083e123dfdbffe9e (patch)
treee6b2f09fef5f7481f019c9b7fe460ab1bbac41fe /src/util.c
parent8093c893237cc5b67422d5b59db0c44acb5b2bd1 (diff)
downloadcpio-031090eb8eca0e1e3b4f14bd083e123dfdbffe9e.tar.gz
cpio-031090eb8eca0e1e3b4f14bd083e123dfdbffe9e.tar.bz2
Fix mingw build. Thanks to Robert Millan.
* NEWS, THANKS: Update. * bootstrap: Create lib/system.c, m4/sysdep.m4, update lib/system.h. * mingw.m4, sysdep.m4: New files. * configure.ac: Raise version number to 2.9.90. Call CPIO_SYSDEP. Remove the call to gl_USE_SYSTEM_EXTENSIONS. (AC_CHECK_HEADERS): Add process.h sys/ioctl.h * lib/Makefile.am (libcpio_a_SOURCES): Add system.c * src/idcache.c: Include system.h * src/userspec.c: Remove alloca stuff (already handled by gnulib). Include alloca.h. Remove useless declarations of get.* functions. * src/util.c: Include sys/ioctl.h conditionally.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index e93b9bd..2732f37 100644
--- a/src/util.c
+++ b/src/util.c
@@ -33,7 +33,9 @@
#include <hash.h>
#include <utimens.h>
-#include <sys/ioctl.h>
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
#ifdef HAVE_SYS_MTIO_H
# ifdef HAVE_SYS_IO_TRIOCTL_H
@@ -1266,7 +1268,10 @@ stat_to_cpio (struct cpio_file_stat *hdr, struct stat *st)
}
#ifndef HAVE_FCHOWN
-# define fchown(fd, uid, gid) (-1)
+# define HAVE_FCHOWN 0
+#endif
+#ifndef HAVE_FCHMOD
+# define HAVE_FCHMOD 0
#endif
int

Return to:

Send suggestions and report system problems to the System administrator.