void-packages/srcpkgs/ConsoleKit2/patches/9999-musl.patch

12 lines
539 B
Diff

--- pam-ck-connector/pam-ck-connector.c.orig 2015-05-14 06:36:12.217472340 +0200
+++ pam-ck-connector/pam-ck-connector.c 2015-05-14 06:37:03.465067270 +0200
@@ -197,7 +197,8 @@ _util_name_to_uid (const char *username,
bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
if (bufsize == -1) {
- return res;
+ /* musl returns -1, so that use a considerable buffer size */
+ bufsize = BUFSIZ;
}
buf = calloc (sizeof (char), bufsize);
rc = getpwnam_r (username, &pwd, buf, bufsize, &pwdp);