summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-30 14:26:04 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-30 14:26:35 (GMT)
commitf70b49b498acde94e2df54561c951327d84f6f30 (patch)
treef7419c83b02e61380a0dd09148b74e5b55485689 /Utilities/cmlibarchive/libarchive
parentfeea34e7eb483e8db28947920757612a95ab1863 (diff)
downloadCMake-f70b49b498acde94e2df54561c951327d84f6f30.zip
CMake-f70b49b498acde94e2df54561c951327d84f6f30.tar.gz
CMake-f70b49b498acde94e2df54561c951327d84f6f30.tar.bz2
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`.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_pack_dev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_pack_dev.c b/Utilities/cmlibarchive/libarchive/archive_pack_dev.c
index 53bddd7..f8286d8 100644
--- a/Utilities/cmlibarchive/libarchive/archive_pack_dev.c
+++ b/Utilities/cmlibarchive/libarchive/archive_pack_dev.c
@@ -57,8 +57,12 @@ __RCSID("$NetBSD$");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#ifdef HAVE_SYS_SYSMACROS_H
+#if MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#define HAVE_MAJOR
+#elif MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
+#define HAVE_MAJOR
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>