From 7bb9ccad9c0dceea327d7ac41a3cf4ea6d284423 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 27 Feb 2012 15:14:41 +0000 Subject: [PATCH] MIPS: fix pthread_attr_t definitions. --- ChangeLog.mips | 9 +++++++++ sysdeps/unix/sysv/linux/mips/bits/siginfo.h | 5 ++++- sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h | 8 ++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 9442105..3198ace 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,12 @@ +2012-02-27 Joseph Myers + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (pthread_attr_t): + Change union tag to pthread_attr_t. Only define typedef if not + already defined. + * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h + (pthread_attr_t): Change union tag to pthread_attr_t. Only define + typedef if not already defined. + 2012-02-26 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Don't name diff --git a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h index 3d776e2..19975fb 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/mips/bits/siginfo.h @@ -274,7 +274,10 @@ enum # endif /* Forward declaration. */ -typedef union __pthread_attr pthread_attr_t; +# ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +# endif typedef struct sigevent { diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h index 87a25da..a479f2d 100644 --- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h +++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h @@ -50,11 +50,15 @@ typedef unsigned long int pthread_t; -typedef union __pthread_attr +union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; -} pthread_attr_t; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif #if _MIPS_SIM == _ABI64 -- 2.7.4