Skip to content

Commit 3f3b3ef

Browse files
authored
Always use our supplied la_queue.h (libarchive#2222)
On legacy systems the OS supplied `sys/queue.h` may lack the required macros, so to avoid having to verify if the version of queue.h is of use, opt to always to `la_queue.h` which will match expectations. Allows libarchive to build on legacy Darwin where `STAILQ_FOREACH` would be missing from `sys/queue.h`. Resolves libarchive#2220
1 parent 89a0184 commit 3f3b3ef

5 files changed

Lines changed: 1 addition & 10 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,6 @@ LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H)
743743
LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H)
744744
LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
745745
LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H)
746-
LA_CHECK_INCLUDE_FILE("sys/queue.h" HAVE_SYS_QUEUE_H)
747746
LA_CHECK_INCLUDE_FILE("sys/richacl.h" HAVE_SYS_RICHACL_H)
748747
LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H)
749748
LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)

build/cmake/config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,9 +1132,6 @@ typedef uint64_t uintmax_t;
11321132
/* Define to 1 if you have the <sys/poll.h> header file. */
11331133
#cmakedefine HAVE_SYS_POLL_H 1
11341134

1135-
/* Define to 1 if you have the <sys/queue.h> header file. */
1136-
#cmakedefine HAVE_SYS_QUEUE_H 1
1137-
11381135
/* Define to 1 if you have the <sys/richacl.h> header file. */
11391136
#cmakedefine HAVE_SYS_RICHACL_H 1
11401137

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ AC_CHECK_HEADERS([locale.h membership.h paths.h poll.h pthread.h pwd.h])
362362
AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h])
363363
AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h])
364364
AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h])
365-
AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h sys/queue.h])
365+
AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h])
366366
AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h])
367367
AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h sys/sysmacros.h])
368368
AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h])

libarchive/config_freebsd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@
203203
#define HAVE_SYS_MOUNT_H 1
204204
#define HAVE_SYS_PARAM_H 1
205205
#define HAVE_SYS_POLL_H 1
206-
#define HAVE_SYS_QUEUE_H 1
207206
#define HAVE_SYS_SELECT_H 1
208207
#define HAVE_SYS_STATVFS_H 1
209208
#define HAVE_SYS_STAT_H 1

unzip/bsdunzip.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@
3636

3737
#include "bsdunzip_platform.h"
3838

39-
#ifdef HAVE_SYS_QUEUE_H
40-
#include <sys/queue.h>
41-
#else
4239
#include "la_queue.h"
43-
#endif
4440
#ifdef HAVE_SYS_STAT_H
4541
#include <sys/stat.h>
4642
#endif

0 commit comments

Comments
 (0)