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:
6
funcs.c
6
funcs.c
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#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
|
#if HAVE_KILLPG
|
||||||
/*
|
/*
|
||||||
@ -2968,11 +2968,11 @@ test_eval(Test_env *te, Test_op op, const char *opnd1, const char *opnd2,
|
|||||||
|
|
||||||
/* -O */
|
/* -O */
|
||||||
case TO_FILUID:
|
case TO_FILUID:
|
||||||
return (stat(opnd1, &b1) == 0 && b1.st_uid == ksheuid);
|
return (stat(opnd1, &b1) == 0 && (uid_t)b1.st_uid == ksheuid);
|
||||||
|
|
||||||
/* -G */
|
/* -G */
|
||||||
case TO_FILGID:
|
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
|
* Binary Operators
|
||||||
|
Reference in New Issue
Block a user