From: Sevan Janiyan Date: Tue, 11 Jun 2024 03:42:13 +0000 (+0100) Subject: Always use our supplied la_queue.h (#2222) X-Git-Tag: v3.7.5~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f3b3efec27ef8c9587b5c725345ff235b98820a;p=thirdparty%2Flibarchive.git Always use our supplied la_queue.h (#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 #2220 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 51c8c0814..3c86789c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -743,7 +743,6 @@ LA_CHECK_INCLUDE_FILE("sys/mkdev.h" HAVE_SYS_MKDEV_H) LA_CHECK_INCLUDE_FILE("sys/mount.h" HAVE_SYS_MOUNT_H) LA_CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H) LA_CHECK_INCLUDE_FILE("sys/poll.h" HAVE_SYS_POLL_H) -LA_CHECK_INCLUDE_FILE("sys/queue.h" HAVE_SYS_QUEUE_H) LA_CHECK_INCLUDE_FILE("sys/richacl.h" HAVE_SYS_RICHACL_H) LA_CHECK_INCLUDE_FILE("sys/select.h" HAVE_SYS_SELECT_H) LA_CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H) diff --git a/build/cmake/config.h.in b/build/cmake/config.h.in index d47694c0c..d6e548792 100644 --- a/build/cmake/config.h.in +++ b/build/cmake/config.h.in @@ -1132,9 +1132,6 @@ typedef uint64_t uintmax_t; /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_POLL_H 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_QUEUE_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYS_RICHACL_H 1 diff --git a/configure.ac b/configure.ac index c4c219f1c..7250b686f 100644 --- a/configure.ac +++ b/configure.ac @@ -362,7 +362,7 @@ AC_CHECK_HEADERS([locale.h membership.h paths.h poll.h pthread.h pwd.h]) AC_CHECK_HEADERS([readpassphrase.h signal.h spawn.h]) AC_CHECK_HEADERS([stdarg.h stdint.h stdlib.h string.h]) AC_CHECK_HEADERS([sys/acl.h sys/cdefs.h sys/ea.h sys/extattr.h]) -AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h sys/queue.h]) +AC_CHECK_HEADERS([sys/ioctl.h sys/mkdev.h sys/mount.h]) AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/richacl.h]) AC_CHECK_HEADERS([sys/select.h sys/statfs.h sys/statvfs.h sys/sysmacros.h]) AC_CHECK_HEADERS([sys/time.h sys/utime.h sys/utsname.h sys/vfs.h sys/xattr.h]) diff --git a/libarchive/config_freebsd.h b/libarchive/config_freebsd.h index d0f3e2300..a1bf0dfe9 100644 --- a/libarchive/config_freebsd.h +++ b/libarchive/config_freebsd.h @@ -203,7 +203,6 @@ #define HAVE_SYS_MOUNT_H 1 #define HAVE_SYS_PARAM_H 1 #define HAVE_SYS_POLL_H 1 -#define HAVE_SYS_QUEUE_H 1 #define HAVE_SYS_SELECT_H 1 #define HAVE_SYS_STATVFS_H 1 #define HAVE_SYS_STAT_H 1 diff --git a/unzip/bsdunzip.c b/unzip/bsdunzip.c index cec181048..50e08e399 100644 --- a/unzip/bsdunzip.c +++ b/unzip/bsdunzip.c @@ -36,11 +36,7 @@ #include "bsdunzip_platform.h" -#ifdef HAVE_SYS_QUEUE_H -#include -#else #include "la_queue.h" -#endif #ifdef HAVE_SYS_STAT_H #include #endif