Merge pull request #286 from compnerd/major-update

linux: update header used for `major` macro
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d9e470..3cb3676 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -160,6 +160,7 @@
 check_include_files("sys/guarded.h" HAVE_SYS_GUARDED_H)
 check_include_files("sys/stat.h" HAVE_SYS_STAT_H)
 check_include_files("sys/types.h" HAVE_SYS_TYPES_H)
+check_include_files("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H)
 check_include_files("unistd.h" HAVE_UNISTD_H)
 check_include_files("objc/objc-internal.h" HAVE_OBJC)
 
diff --git a/cmake/config.h.in b/cmake/config.h.in
index 6696e98..3a3245f 100644
--- a/cmake/config.h.in
+++ b/cmake/config.h.in
@@ -188,6 +188,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #cmakedefine01 HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the <sys/sysmacros.h> header file.  */
+#cmakedefine01 HAVE_SYS_SYSMACROS_H
+
 /* Define to 1 if you have the <TargetConditionals.h> header file. */
 #cmakedefine HAVE_TARGETCONDITIONALS_H
 
diff --git a/os/linux_base.h b/os/linux_base.h
index c8b9cad..f1e72bf 100644
--- a/os/linux_base.h
+++ b/os/linux_base.h
@@ -13,6 +13,11 @@
 #ifndef __OS_LINUX_BASE__
 #define __OS_LINUX_BASE__
 
+#include <config/config_ac.h>
+
+#if HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
 #include <sys/param.h>
 
 #if HAVE_SYS_CDEFS_H