summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/kvx/__syscall_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/kvx/__syscall_error.c')
-rw-r--r--libc/sysdeps/linux/kvx/__syscall_error.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/kvx/__syscall_error.c b/libc/sysdeps/linux/kvx/__syscall_error.c
new file mode 100644
index 000000000..d534ee7d4
--- /dev/null
+++ b/libc/sysdeps/linux/kvx/__syscall_error.c
@@ -0,0 +1,19 @@
+/*
+ * This file is subject to the terms and conditions of the LGPL V2.1
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2018 Kalray Inc.
+ */
+
+#include <errno.h>
+#include <features.h>
+
+/* This routine is jumped to by all the syscall handlers, to stash
+ * an error number into errno. */
+long __syscall_error(int err_no) attribute_hidden;
+long __syscall_error(int err_no)
+{
+ __set_errno(-err_no);
+ return -1;
+}