projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add isastream (obsolete STREAMS junk)
[musl]
/
src
/
misc
/
isastream.c
diff --git a/src/misc/isastream.c
b/src/misc/isastream.c
new file mode 100644
(file)
index 0000000..
4dafdb0
--- /dev/null
+++ b/
src/misc/isastream.c
@@ -0,0
+1,7
@@
+#include <stropts.h>
+#include <fcntl.h>
+
+int isastream(int fd)
+{
+ return fcntl(fd, F_GETFD) < 0 ? -1 : 0;
+}