summaryrefslogtreecommitdiff
path: root/sys-process/procenv/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-15 10:39:51 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-15 10:39:51 +0100
commit9b6120d8af003bb775da6737dfe42f8f580f59f6 (patch)
tree965a7890c4893d608fd8d3ce04030376ab565a45 /sys-process/procenv/files
parent80765b090d10ae3f68b00e3befe5859f7212e536 (diff)
gentoo auto-resync : 15:07:2023 - 10:39:50
Diffstat (limited to 'sys-process/procenv/files')
-rw-r--r--sys-process/procenv/files/procenv-0.51-musl-sysmacros.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/sys-process/procenv/files/procenv-0.51-musl-sysmacros.patch b/sys-process/procenv/files/procenv-0.51-musl-sysmacros.patch
new file mode 100644
index 000000000000..cd93a1d359ac
--- /dev/null
+++ b/sys-process/procenv/files/procenv-0.51-musl-sysmacros.patch
@@ -0,0 +1,53 @@
+https://github.com/jamesodhunt/procenv/pull/27
+From: Brahmajit Das <brahmajit.xyz@gmail.com>
+Date: Mon, 5 Jun 2023 14:10:48 +0000
+Subject: [PATCH] Fix build on musl libc
+
+On util.c the guard around #include sys/sysmacros.h prevents musl libc
+from including the file, even though musl provides the header file, thus
+failing with errors such as "call to undeclared function makedev".
+
+In procenv.c although the function makedev is used but the file
+sysmacros.h was never included, thus resulting in similar "call to
+undeclared function makedev" error hence moving inclusion sysmacros.h to
+source file from header file.
+
+Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
+--- a/src/procenv.c
++++ b/src/procenv.c
+@@ -27,6 +27,8 @@
+ */
+
+ #include <procenv.h>
++/* major(3) / minor(3) */
++#include <sys/sysmacros.h>
+
+ /**
+ * doc:
+--- a/src/procenv.h
++++ b/src/procenv.h
+@@ -103,9 +103,6 @@
+ #define PACKAGE_STRING PACKAGE_NAME
+ #endif
+
+-/* major(3) / minor(3) */
+-#include <sys/sysmacros.h>
+-
+ #endif /* PROCENV_PLATFORM_ANDROID */
+
+ /*********************************************************************/
+--- a/src/util.c
++++ b/src/util.c
+@@ -17,9 +17,7 @@
+ */
+
+ #include "util.h"
+-#if __GLIBC__
+ #include <sys/sysmacros.h>
+-#endif
+
+ // FIXME
+ extern struct procenv_user user;
+--
+2.40.1
+