posix: Implement fdetach and fattach

`fdetach()` and `fattach()` are required
as part of _XOPEN_STREAMS Option Group.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
This commit is contained in:
Gaetan Perrot 2024-02-02 19:29:57 +09:00 committed by Fabio Baltieri
parent dd7caf667c
commit cd060f6cd3
2 changed files with 19 additions and 0 deletions

View file

@ -18,6 +18,8 @@ struct strbuf {
};
int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr, int flags);
int fdetach(const char *path);
int fattach(int fildes, const char *path);
#ifdef __cplusplus
}

View file

@ -18,3 +18,20 @@ int putmsg(int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr
errno = ENOSYS;
return -1;
}
int fdetach(const char *path)
{
ARG_UNUSED(path);
errno = ENOSYS;
return -1;
}
int fattach(int fildes, const char *path)
{
ARG_UNUSED(fildes);
ARG_UNUSED(path);
errno = ENOSYS;
return -1;
}