]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
libarchive: Fix detection of 'major' on Solaris 11.4 1324/head
authorBrad King <brad.king@kitware.com>
Thu, 30 Jan 2020 14:49:22 +0000 (09:49 -0500)
committerBrad King <brad.king@kitware.com>
Thu, 30 Jan 2020 14:49:22 +0000 (09:49 -0500)
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.

libarchive/archive_pack_dev.c

index a5e57ac209d444f70e3ec47579a7e7756ef4cb8e..f8286d82183f6dd90860d5e3b52d6b2de8681c1a 100644 (file)
@@ -57,11 +57,12 @@ __RCSID("$NetBSD$");
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_SYS_SYSMACROS_H
-#include <sys/sysmacros.h>
-#endif
-#ifdef HAVE_SYS_MKDEV_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>