summaryrefslogtreecommitdiff
path: root/experimental/slurm/musl-getpwent.patch
blob: 32b12db1d59b6c7e1ec46073bc1d91cb0616dab4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)) {