Skip to content

Commit

Permalink
Various small fixes for Cygwin, Haiku, OpenIndiana (libarchive#2346)
Browse files Browse the repository at this point in the history
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 <windef.h> solves the problem.

Co-authored-by: vco <[email protected]>
  • Loading branch information
vcoxvco and vco authored Oct 14, 2024
1 parent d8c3b97 commit 40ff837
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libarchive/archive_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
# endif
#endif

/* For cygwin, to avoid missing LONG, ULONG, PUCHAR, ... definitions */
#ifdef __CYGWIN__
#include <windef.h>
#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
Expand Down
2 changes: 1 addition & 1 deletion libarchive/archive_write_disk_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions tar/bsdtar.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#include "bsdtar_platform.h"

#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
Expand Down

0 comments on commit 40ff837

Please sign in to comment.