From: Stefan Krah Date: Tue, 26 Apr 2016 09:43:21 +0000 (+0200) Subject: Issue #20306: Android is the only system that returns NULL for the pw_passwd X-Git-Tag: v3.6.0a1~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=45009778aa131b99bc95412390dae232d9f760a7;p=thirdparty%2FPython%2Fcpython.git Issue #20306: Android is the only system that returns NULL for the pw_passwd field. Rather than cluttering the tests, translate the arguably more correct "None" to an empty string. --- diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index c5032562e61c..61be3b2157f4 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -75,7 +75,7 @@ mkpwent(struct passwd *p) #define SETS(i,val) sets(v, i, val) SETS(setIndex++, p->pw_name); -#if defined(HAVE_STRUCT_PASSWD_PW_PASSWD) +#if defined(HAVE_STRUCT_PASSWD_PW_PASSWD) && !defined(__ANDROID__) SETS(setIndex++, p->pw_passwd); #else SETS(setIndex++, "");