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:
authorMike Frysinger <vapier@gentoo.org>2023-12-30 01:52:31 +0300
committerMike Frysinger <vapier@gentoo.org>2024-01-20 06:23:47 +0300
commit9b35bf859aeb32d9a11815d683e5cde2053bc420 (patch)
tree79af582b8862119bf769f0537c1b73bf7f7a486e /libgloss
parent74674f2cc880bdcda585da1102aa00aaa374d28f (diff)
libgloss: sparc_leon: workaround newer newlib pthread APIs
Fix a compile error due to duplicate pthreads types: .../libgloss/sparc_leon/mutex.c:50:8: error: conflicting types for ‘pthread_mutex_t’; have ‘struct pthread_mutex’ 50 | } pthread_mutex_t; In file included from .../newlib/libc/include/sys/types.h:221, from .../libgloss/sparc_leon/mutex.c:26: .../newlib/libc/include/sys/_pthreadtypes.h:154:20: note: previous declaration of ‘pthread_mutex_t’ with type ‘pthread_mutex_t’ {aka ‘long unsigned int’} 154 | typedef __uint32_t pthread_mutex_t; /* identify a mutex */ .../libgloss/sparc_leon/mutex.c:57:8: error: conflicting types for ‘pthread_mutexattr_t’; have ‘struct <anonymous>’ 57 | } pthread_mutexattr_t; ../newlib/libc/include/sys/_pthreadtypes.h:169:3: note: previous declaration of ‘pthread_mutexattr_t’ with type ‘pthread_mutexattr_t’ 169 | } pthread_mutexattr_t;
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/sparc_leon/mutex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgloss/sparc_leon/mutex.c b/libgloss/sparc_leon/mutex.c
index eb2c2996d..3f51fead3 100644
--- a/libgloss/sparc_leon/mutex.c
+++ b/libgloss/sparc_leon/mutex.c
@@ -23,9 +23,13 @@
*/
+#define pthread_mutex_t pthread_mutex_t_
+#define pthread_mutexattr_t pthread_mutexattr_t_
#include <sys/types.h>
#include <sys/lock.h>
#include <asm-leon/queue.h>
+#undef pthread_mutex_t
+#undef pthread_mutexattr_t
/*#include <sys/fsu_pthread_mutex.h>*/
typedef int pthread_protocol_t;