Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/riscv/sys_lstat.c')
-rw-r--r--libgloss/riscv/sys_lstat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libgloss/riscv/sys_lstat.c b/libgloss/riscv/sys_lstat.c
new file mode 100644
index 000000000..2eeabcce3
--- /dev/null
+++ b/libgloss/riscv/sys_lstat.c
@@ -0,0 +1,13 @@
+#include <machine/syscall.h>
+#include <sys/stat.h>
+#include "internal_syscall.h"
+#include "kernel_stat.h"
+
+/* Status of a link (by name). */
+int _lstat(const char *file, struct stat *st)
+{
+ struct kernel_stat kst;
+ int rv = syscall_errno (SYS_lstat, file, &kst, 0, 0, 0, 0);
+ _conv_stat (st, &kst);
+ return rv;
+}