From 40ff837717b89e9a5d2c735758f503d124d17b72 Mon Sep 17 00:00:00 2001 From: vcoxvco <62189056+vcoxvco@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:44:17 +0200 Subject: [PATCH] Various small fixes for Cygwin, Haiku, OpenIndiana (#2346) Cygwin 3.5.4 (same applies for 3.5.3), I get a compile error as shown below after a simple ./configure and make. Adding solves the problem. Co-authored-by: vco --- libarchive/archive_platform.h | 5 +++++ libarchive/archive_write_disk_posix.c | 2 +- tar/bsdtar.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libarchive/archive_platform.h b/libarchive/archive_platform.h index 24e8b5032..f30df1104 100644 --- a/libarchive/archive_platform.h +++ b/libarchive/archive_platform.h @@ -61,6 +61,11 @@ # endif #endif +/* For cygwin, to avoid missing LONG, ULONG, PUCHAR, ... definitions */ +#ifdef __CYGWIN__ +#include +#endif + /* It should be possible to get rid of this by extending the feature-test * macros to cover Windows API functions, probably along with non-trivial * refactoring of code to find structures that sit more cleanly on top of diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c index d9619fe2d..d69ab34e8 100644 --- a/libarchive/archive_write_disk_posix.c +++ b/libarchive/archive_write_disk_posix.c @@ -3605,7 +3605,7 @@ set_time_tru64(int fd, int mode, const char *name, tstamp.atime.tv_sec = atime; tstamp.mtime.tv_sec = mtime; tstamp.ctime.tv_sec = ctime; -#if defined (__hpux) && defined (__ia64) +#if defined (__hpux) && ( defined (__ia64) || defined (__hppa) ) tstamp.atime.tv_nsec = atime_nsec; tstamp.mtime.tv_nsec = mtime_nsec; tstamp.ctime.tv_nsec = ctime_nsec; diff --git a/tar/bsdtar.c b/tar/bsdtar.c index 439093ded..daa24ffe5 100644 --- a/tar/bsdtar.c +++ b/tar/bsdtar.c @@ -7,6 +7,9 @@ #include "bsdtar_platform.h" +#ifdef HAVE_LIMITS_H +#include +#endif #ifdef HAVE_SYS_PARAM_H #include #endif -- 2.47.2