From: Brad King Date: Thu, 30 Jan 2020 14:49:22 +0000 (-0500) Subject: libarchive: Fix detection of 'major' on Solaris 11.4 X-Git-Tag: v3.4.2~14^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1324%2Fhead;p=thirdparty%2Flibarchive.git libarchive: Fix detection of 'major' on Solaris 11.4 In `archive_pack_dev.c` there is code checking the `HAVE_MAJOR` macro, but it is not computed. Port the equivalent logic from `archive_entry.c` to define the macro. --- diff --git a/libarchive/archive_pack_dev.c b/libarchive/archive_pack_dev.c index a5e57ac20..f8286d821 100644 --- a/libarchive/archive_pack_dev.c +++ b/libarchive/archive_pack_dev.c @@ -57,11 +57,12 @@ __RCSID("$NetBSD$"); #ifdef HAVE_SYS_STAT_H #include #endif -#ifdef HAVE_SYS_SYSMACROS_H -#include -#endif -#ifdef HAVE_SYS_MKDEV_H +#if MAJOR_IN_MKDEV #include +#define HAVE_MAJOR +#elif MAJOR_IN_SYSMACROS +#include +#define HAVE_MAJOR #endif #ifdef HAVE_UNISTD_H #include