diff options
Diffstat (limited to 'libc/sysdeps/linux/frv/bits/syscalls.h')
-rw-r--r-- | libc/sysdeps/linux/frv/bits/syscalls.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/frv/bits/syscalls.h b/libc/sysdeps/linux/frv/bits/syscalls.h index 44dba866b..23219d602 100644 --- a/libc/sysdeps/linux/frv/bits/syscalls.h +++ b/libc/sysdeps/linux/frv/bits/syscalls.h @@ -9,9 +9,6 @@ * programs. */ #include <bits/sysnum.h> -#ifndef __set_errno -# define __set_errno(val) ((*__errno_location ()) = (val)) -#endif #ifndef SYS_ify # define SYS_ify(syscall_name) (__NR_##syscall_name) #endif @@ -19,7 +16,7 @@ #ifndef __ASSEMBLER__ /* user-visible error numbers are in the range -1 - -4095: see <asm-frv/errno.h> */ -#ifdef _LIBC +#if defined _LIBC && !defined __set_errno # define __syscall_return(type, res) \ do { \ unsigned long __sr2 = (res); \ @@ -43,6 +40,10 @@ do { \ } while (0) #endif +#ifndef __set_errno +# define __set_errno(val) ((*__errno_location ()) = (val)) +#endif + /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ #define _syscall0(type,name) \ |