From 1e4445bea8ef4b1cf31a1bfc6e211c6c445b7c62 Mon Sep 17 00:00:00 2001 From: kientzle Date: Sat, 15 Mar 2008 04:20:50 +0000 Subject: [PATCH] FreeBSD does have fstat(). Correct the nasty typo this uncovers. --- lib/libarchive/archive_write_disk.c | 2 +- lib/libarchive/config_freebsd.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libarchive/archive_write_disk.c b/lib/libarchive/archive_write_disk.c index d3dfa68d2ca3..394df80525cb 100644 --- a/lib/libarchive/archive_write_disk.c +++ b/lib/libarchive/archive_write_disk.c @@ -1611,7 +1611,7 @@ set_mode(struct archive_write_disk *a, int mode) if (a->pst != NULL) { /* Already have stat() data available. */ #ifdef HAVE_FSTAT - } else if (fd >= 0 && fstat(fd, &a->st) == 0) { + } else if (a->fd >= 0 && fstat(a->fd, &a->st) == 0) { a->pst = &a->st; #endif } else if (stat(a->name, &a->st) == 0) { diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h index 37f1c513c19b..6dddb0f9b0d1 100644 --- a/lib/libarchive/config_freebsd.h +++ b/lib/libarchive/config_freebsd.h @@ -53,6 +53,7 @@ #define HAVE_FCHOWN 1 #define HAVE_FCNTL_H 1 #define HAVE_FSEEKO 1 +#define HAVE_FSTAT 1 #define HAVE_FUTIMES 1 #define HAVE_GETEUID 1 #define HAVE_GETPID 1