[hackers] [ubase] Explicitly include sys/sysmacros.h for makedev etc || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 22 Sep 2023 14:23:04 +0200 (CEST)

commit 58d0c4db69ed11b676daacc436347ea4657d981f
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Sep 22 10:06:21 2023 +0200
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Sep 22 10:06:21 2023 +0200

    Explicitly include sys/sysmacros.h for makedev etc
    
    This header used to be included by sys/types.h in glibc, and musl
    adopted the behaviour. However, this dependency was never desired, so
    glibc deprecated it in 2016 and finally removed it in 2019, and so did
    musl. Explicitly including the header should be a no-op on older libc
    versions and fixes the build on newer versions.
    
    https://sourceware.org/bugzilla/show_bug.cgi?id=19239
    https://git.musl-libc.org/cgit/musl/commit/?id=f552c79

diff --git a/libutil/tty.c b/libutil/tty.c
index bceb01e..3cb3b70 100644
--- a/libutil/tty.c
+++ b/libutil/tty.c
_AT_@ -1,4 +1,5 @@
 /* See LICENSE file for copyright and license details. */
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff --git a/mknod.c b/mknod.c
index 8de35c7..518ecb0 100644
--- a/mknod.c
+++ b/mknod.c
_AT_@ -1,5 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 
 #include <fcntl.h>
diff --git a/mountpoint.c b/mountpoint.c
index 8f205a2..9a31bbe 100644
--- a/mountpoint.c
+++ b/mountpoint.c
_AT_@ -1,5 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 
 #include <mntent.h>
diff --git a/stat.c b/stat.c
index 220a659..9e96d80 100644
--- a/stat.c
+++ b/stat.c
_AT_@ -1,5 +1,6 @@
 /* See LICENSE file for copyright and license details. */
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 
 #include <inttypes.h>
Received on Fri Sep 22 2023 - 14:23:04 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 22 2023 - 14:24:35 CEST