void-packages/srcpkgs/slurm-wlm/patches/musl-getpwent.patch

16 lines
452 B
Diff

Source: @pullmoll
Upstream: no
Reason: Musl libc does not have getpwent_r(3)
--- a/src/slurmctld/groups.c 2020-02-23 12:46:32.011563195 +0100
+++ b/src/slurmctld/groups.c 2020-02-23 12:48:19.259558919 +0100
@@ -206,7 +206,7 @@
}
endgrent();
setpwent();
-#if defined (__APPLE__)
+#if defined (__APPLE__) || !defined(__GLIBC__)
while ((pwd_result = getpwent()) != NULL) {
#else
while (!getpwent_r(&pw, pw_buffer, PW_BUF_SIZE, &pwd_result)) {