add explicit casts to uid_t and gid_t of the struct stat slots, for some

architectures on Linux have a truly horrible struct stat definition, as
seen in dietlibc’s source code
https://buildd.debian.org/status/fetch.php?pkg=mksh&arch=mipsel&ver=40.2-4&stamp=1321054539
This commit is contained in:
tg 2011-11-19 17:42:24 +00:00
parent 0220aeeb61
commit 709524edd1
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.198 2011/11/09 22:17:25 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.199 2011/11/19 17:42:24 tg Exp $");
#if HAVE_KILLPG
/*
@ -2968,11 +2968,11 @@ test_eval(Test_env *te, Test_op op, const char *opnd1, const char *opnd2,
/* -O */
case TO_FILUID:
return (stat(opnd1, &b1) == 0 && b1.st_uid == ksheuid);
return (stat(opnd1, &b1) == 0 && (uid_t)b1.st_uid == ksheuid);
/* -G */
case TO_FILGID:
return (stat(opnd1, &b1) == 0 && b1.st_gid == getegid());
return (stat(opnd1, &b1) == 0 && (gid_t)b1.st_gid == getegid());
/*
* Binary Operators