ConsoleKit2: handle sysconf(_SC_GETPW_R_SIZE_MAX) on musl.
This commit is contained in:
parent
bc66ad89c8
commit
6a2601fff1
|
@ -0,0 +1,12 @@
|
|||
--- a/pam-ck-connector/pam-ck-connector.c.orig 2015-05-14 06:36:12.217472340 +0200
|
||||
+++ b/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);
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'ConsoleKit2'
|
||||
pkgname=ConsoleKit2
|
||||
version=0.9.2
|
||||
revision=4
|
||||
revision=5
|
||||
patch_args="-Np1"
|
||||
build_pie=yes
|
||||
build_style=gnu-configure
|
||||
|
|
Loading…
Reference in New Issue