summaryrefslogtreecommitdiff
path: root/sys-libs/musl/files/musl-1.2.2-gethostid.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-28 03:03:20 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-28 03:03:20 +0100
commit0b1f53c54388382ff701d00d3f5eb981ed040f2a (patch)
treeec5c4665c03dbae83c878cb536837e611a8584a6 /sys-libs/musl/files/musl-1.2.2-gethostid.patch
parent59fb67b05708a525b33b4a84de896b3b1ae34012 (diff)
gentoo auto-resync : 28:07:2022 - 03:03:20
Diffstat (limited to 'sys-libs/musl/files/musl-1.2.2-gethostid.patch')
-rw-r--r--sys-libs/musl/files/musl-1.2.2-gethostid.patch43
1 files changed, 0 insertions, 43 deletions
diff --git a/sys-libs/musl/files/musl-1.2.2-gethostid.patch b/sys-libs/musl/files/musl-1.2.2-gethostid.patch
deleted file mode 100644
index 96c799cfca29..000000000000
--- a/sys-libs/musl/files/musl-1.2.2-gethostid.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Subject: [musl] [PATCH] extend gethostid beyond a stub
-Archived-At: <https://inbox.vuxu.org/musl/20210420191519.23822-3-ericonr@disroot.org/>
-List-Archive: <https://inbox.vuxu.org/musl/>
-List-Post: <mailto:musl@inbox.vuxu.org>
-
-From: Érico Rolim <erico.erc@gmail.com>
-
-Implement part of the glibc behavior, where the 32-bit identifier stored
-in /etc/hostid, if the file exists, is returned. If this file doesn't
-contain at least 32 bits or can't be opened for some reason, return 0.
----
- src/misc/gethostid.c | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/src/misc/gethostid.c b/src/misc/gethostid.c
-index 25bb35db..d529de9c 100644
---- a/src/misc/gethostid.c
-+++ b/src/misc/gethostid.c
-@@ -1,6 +1,19 @@
- #include <unistd.h>
-+#include <stdio.h>
-+#include <stdint.h>
-
- long gethostid()
- {
-- return 0;
-+ FILE *f;
-+ int32_t rv = 0;
-+
-+ f = fopen("/etc/hostid", "reb");
-+ if (f) {
-+ if (fread(&rv, sizeof(rv), 1, f) == 0) {
-+ rv = 0;
-+ }
-+ fclose(f);
-+ }
-+
-+ return rv;
- }
---
-2.31.1
-
-