From 51439f012a7b28082b8ae8588bb709ea90df9da0 Mon Sep 17 00:00:00 2001 From: Gaetan Perrot Date: Fri, 2 Feb 2024 18:52:59 +0900 Subject: [PATCH] posix: Implement isastream `isastream()` is required as part of _XOPEN_STREAMS Option Group. signed-off-by: Gaetan Perrot --- include/zephyr/posix/stropts.h | 1 + lib/posix/options/stropts.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/include/zephyr/posix/stropts.h b/include/zephyr/posix/stropts.h index 649f0d87b7..41afdb5ae2 100644 --- a/include/zephyr/posix/stropts.h +++ b/include/zephyr/posix/stropts.h @@ -22,6 +22,7 @@ int fdetach(const char *path); int fattach(int fildes, const char *path); int getmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *flagsp); int getpmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *bandp, int *flagsp); +int isastream(int fildes); #ifdef __cplusplus } diff --git a/lib/posix/options/stropts.c b/lib/posix/options/stropts.c index 66d44fcbb2..c1e6c9f54e 100644 --- a/lib/posix/options/stropts.c +++ b/lib/posix/options/stropts.c @@ -58,3 +58,11 @@ int getpmsg(int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *band errno = ENOSYS; return -1; } + +int isastream(int fildes) +{ + ARG_UNUSED(fildes); + + errno = ENOSYS; + return -1; +}