Author: Jonathan Slark <lostdan+git_AT_lostdan.com>
Date: Sun Apr 12 01:35:58 2020 +0100
Include sys/sysmacros.h where needed
Both musl [1] and glibc [2] have removed sys/sysmacros.h from
sys/types.h so it needs to be included if major, minor, or makedev
are used.
[1]
https://www.openwall.com/lists/musl/2019/06/29/16
[2]
https://sourceware.org/legacy-ml/libc-alpha/2015-11/msg00253.html
diff --git a/libutil/tty.c b/libutil/tty.c
index bceb01e..8a2cd73 100644
--- a/libutil/tty.c
+++ b/libutil/tty.c
_AT_@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <fcntl.h>
#include <dirent.h>
diff --git a/mknod.c b/mknod.c
index 8de35c7..27f91e0 100644
--- a/mknod.c
+++ b/mknod.c
_AT_@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <fcntl.h>
#include <stdio.h>
diff --git a/mountpoint.c b/mountpoint.c
index 8f205a2..fd3a133 100644
--- a/mountpoint.c
+++ b/mountpoint.c
_AT_@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <mntent.h>
#include <stdio.h>
diff --git a/stat.c b/stat.c
index 220a659..40b372d 100644
--- a/stat.c
+++ b/stat.c
_AT_@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
#include <inttypes.h>
#include <stdio.h>
Received on Sun Apr 12 2020 - 22:54:59 CEST