aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic/isastream.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/isastream.c')
-rw-r--r--sysdeps/generic/isastream.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sysdeps/generic/isastream.c b/sysdeps/generic/isastream.c
index 4e595808ea..00a4760aab 100644
--- a/sysdeps/generic/isastream.c
+++ b/sysdeps/generic/isastream.c
@@ -17,16 +17,19 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
+#include <fcntl.h>
#include <stropts.h>
int
isastream (fildes)
int fildes;
{
- __set_errno (ENOSYS);
- return -1;
-}
-
+ /* In general we do not have a STREAMS implementation and therefore
+ return 0. But for invalid file descriptors we have to return an
+ error. */
+ if (__fcntl (fildes, F_GETFD) < 0)
+ return -1;
-stub_warning (isastream)
-#include <stub-tag.h>
+ /* No STREAM. */
+ return 0;
+}