mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
hurd: Fix tst-openloc
On GNU/Hurd, O_RDWR actually is O_WRONLY|O_RDONLY, so checking through
bitness really is wrong. O_ACCMODE is there for this.
Fixes: 5324d25842
("fileops: Don't process ,ccs= as individual mode flags (BZ#18906)")
This commit is contained in:
parent
a3090c2c98
commit
f7f181c12c
@ -76,7 +76,8 @@ do_bz18906 (void)
|
||||
if (fp != NULL)
|
||||
{
|
||||
flags = fcntl (fileno (fp), F_GETFL);
|
||||
retval = (flags & O_RDWR) | (flags & O_WRONLY);
|
||||
retval = ((flags & O_ACCMODE) == O_RDWR);
|
||||
retval |= ((flags & O_ACCMODE) == O_WRONLY);
|
||||
TEST_COMPARE (retval, false);
|
||||
fclose (fp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user