summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-15 01:20:33 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-11-15 01:23:41 +0100
commit723a9e93adb9ba0501f2db449a56c7e0eace5c23 (patch)
tree9ed7973bc2b6d4f2ec7dfd35272a1533fa84a61f
parentd8535473c787386e5a341632ea758013a61b247c (diff)
Add missing "sys/sysmacros.h" header for back in for Linux
On BSD based systems, major(3), minor(3) and makedev(3) are defined in "sys/types.h", but on GNU/Linux systems they are in "sys/sysmacros.h", which is not available on the BSD systems. This patch fixes up compat.h to include "sys/sysmacros.h" on Linux based systems. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--include/util/compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/util/compat.h b/include/util/compat.h
index cb9e81c..76ede23 100644
--- a/include/util/compat.h
+++ b/include/util/compat.h
@@ -105,6 +105,10 @@ struct stat {
#else
#include <sys/types.h>
#include <sys/stat.h>
+
+#ifdef __linux__
+#include <sys/sysmacros.h>
+#endif
#endif
#ifndef HAVE_GETLINE