Fix building warnings on Cygwin

This commit is contained in:
Max Lv
2016-12-30 19:50:22 +08:00
parent 96a16f2612
commit 2f3eb4c11e
3 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -92,7 +92,7 @@ int
ss_isnumeric(const char *s) {
if (!s || !*s)
return 0;
while (isdigit(*s))
while (isdigit((unsigned char)*s))
++s;
return *s == '\0';
}
@@ -140,10 +140,12 @@ run_as(const char *user)
return 0;
}
#ifndef __CYGWIN__
if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) {
LOGE("Could not change supplementary groups for user '%s'.", pwd->pw_name);
return 0;
}
#endif
if (setuid(pwd->pw_uid) != 0) {
LOGE(