MNRS-BM-BSP/libwrap/sys/close.c
2024-05-31 09:21:57 +02:00

19 lines
309 B
C

/* See LICENSE of license details. */
#include "stub.h"
#include "weak_under_alias.h"
#include <errno.h>
#if defined(SEMIHOSTING)
#include "semihosting.h"
#endif
int __wrap_close(int fd) {
#if defined(SEMIHOTING)
int i = sh_close(fd);
return i;
#endif
return _stub(EBADF);
}
weak_under_alias(close);