diff options
Diffstat (limited to 'libc/sysdeps/linux/common/bits')
| -rw-r--r-- | libc/sysdeps/linux/common/bits/errno.h | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/bits/uClibc_stdio.h | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h index cb9c2ee43..bf73a8fe1 100644 --- a/libc/sysdeps/linux/common/bits/errno.h +++ b/libc/sysdeps/linux/common/bits/errno.h @@ -39,7 +39,9 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); # if defined _LIBC /* We wouldn't need a special macro anymore but it is history. */ -# define __set_errno(val) ((errno) = (val)) +# ifndef __set_errno +# define __set_errno(val) ((errno) = (val)) +# endif # endif /* _LIBC */ # if defined __UCLIBC_HAS_THREADS__ diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h index e378489a4..18ec2beca 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h +++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h @@ -119,7 +119,7 @@ #ifdef __UCLIBC_HAS_THREADS__ /* Need this for pthread_mutex_t. */ #include <bits/pthreadtypes.h> -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ #include <bits/stdio-lock.h> #endif @@ -137,7 +137,7 @@ #define __STDIO_AUTO_THREADLOCK_VAR int __infunc_user_locking -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ #define __STDIO_SET_USER_LOCKING(__stream) ((__stream)->__user_locking = 1) @@ -313,7 +313,7 @@ struct __STDIO_FILE_STRUCT { #endif #ifdef __UCLIBC_HAS_THREADS__ int __user_locking; -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ _IO_lock_t _lock; #else pthread_mutex_t __lock; @@ -392,7 +392,7 @@ extern void _stdio_term(void); extern struct __STDIO_FILE_STRUCT *_stdio_openlist; #ifdef __UCLIBC_HAS_THREADS__ -#if defined __UCLIBC_HAS_FUTEXES__ && defined _LIBC +#ifdef __USE_STDIO_FUTEXES__ extern _IO_lock_t _stdio_openlist_lock; #else extern pthread_mutex_t _stdio_openlist_lock; |
