[Pkg-shadow-devel] xgetXXbyYY.c check ERANGE in status, not in errno
Jelle Lensen
jelle.lensen at gmail.com
Wed Oct 28 10:48:36 UTC 2015
Hello,
The getpwnam_r and getgrnam_r wrapper class checks for ERANGE in errno.
This causes problems when compiling with musl, which doesn't save ERANGE
in errno. The following patch corrects this behaviour
diff -u libmisc/xgetXXbyYY.c libmisc/xgetXXbyYY.c.new
--- libmisc/xgetXXbyYY.c 2014-03-01 17:50:05.000000000 +0000
+++ libmisc/xgetXXbyYY.c.new 2015-10-28 10:23:20.186765787 +0000
@@ -100,7 +100,7 @@
return ret_result;
}
- if (ERANGE != errno) {
+ if (ERANGE != status) {
free (buffer);
free (result);
return NULL;
More information about the Pkg-shadow-devel
mailing list