/* Test of ttyname_r(3).
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
);
}
{
- int err = ttyname_r (99, buf, sizeof (buf));
+ int err;
+ close (99);
+ err = ttyname_r (99, buf, sizeof (buf));
ASSERT (err == EBADF
|| err == ENOTTY /* seen on FreeBSD 6.4 */
);