From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id CE6E43858283; Tue, 2 Jan 2024 04:38:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE6E43858283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704170314; bh=qfD9alW+Fh/8dRKPA+I+ap3Z0yaQks3Qu+F7J+KioEw=; h=From:To:Subject:Date:From; b=QAIlIT+ujqFYzAoo7UW1B0surAI08NCsGaWNI7xNmRnjZSKCKlQg8h2dCHqCZRbzI vucRwaD/9f5SagnKp+Enu8k76Me/574RfOFrkqvVHQ2OfOim5Du5UT8Cw6xZpyYo3V cdwNvqXPonywUMGZZ4ca6sZoci2//Cx4501ntN10= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/users/vapier/wip] libgloss: sparc_leon: workaround newer newlib pthread APIs X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/users/vapier/wip X-Git-Oldrev: 97965dfea54b95e258f8b9b97a5871f9c1e8d959 X-Git-Newrev: 1b1ed5c82ffc1bbfa7df600459b247d23980e193 Message-Id: <20240102043834.CE6E43858283@sourceware.org> Date: Tue, 2 Jan 2024 04:38:34 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D1b1ed5c82ff= c1bbfa7df600459b247d23980e193 commit 1b1ed5c82ffc1bbfa7df600459b247d23980e193 Author: Mike Frysinger Date: Fri Dec 29 17:52:31 2023 -0500 libgloss: sparc_leon: workaround newer newlib pthread APIs =20 Fix a compile error due to duplicate pthreads types: .../libgloss/sparc_leon/mutex.c:50:8: error: conflicting types for =E2= =80=98pthread_mutex_t=E2=80=99; have =E2=80=98struct pthread_mutex=E2=80=99 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 decl= aration of =E2=80=98pthread_mutex_t=E2=80=99 with type =E2=80=98pthread_mut= ex_t=E2=80=99 {aka =E2=80=98long unsigned int=E2=80=99} 154 | typedef __uint32_t pthread_mutex_t; /* identify a mutex */ =20 .../libgloss/sparc_leon/mutex.c:57:8: error: conflicting types for =E2= =80=98pthread_mutexattr_t=E2=80=99; have =E2=80=98struct =E2=80= =99 57 | } pthread_mutexattr_t; ../newlib/libc/include/sys/_pthreadtypes.h:169:3: note: previous declar= ation of =E2=80=98pthread_mutexattr_t=E2=80=99 with type =E2=80=98pthread_m= utexattr_t=E2=80=99 169 | } pthread_mutexattr_t; Diff: --- libgloss/sparc_leon/mutex.c | 4 ++++ 1 file changed, 4 insertions(+) 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 @@ */ =20 =20 +#define pthread_mutex_t pthread_mutex_t_ +#define pthread_mutexattr_t pthread_mutexattr_t_ #include #include #include +#undef pthread_mutex_t +#undef pthread_mutexattr_t /*#include */ =20 typedef int pthread_protocol_t;