aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_pack_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_pack_dev.c')
-rw-r--r--libarchive/archive_pack_dev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libarchive/archive_pack_dev.c b/libarchive/archive_pack_dev.c
index a5e57ac209d4..f8286d82183f 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 <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>