[patch] Fix MIPS libpthread build

Joseph S. Myers joseph at codesourcery.com
Tue Jan 3 02:15:33 UTC 2006


This patch fixes the build of libpthread for MIPS.  The definition of 
_test_and_set uses __THROW after the prototype: but attributes are only 
accepted after the prototype in function declarations which aren't 
definitions, not between the prototype and the function body in a 
definition.  The proper macro to use here is __NTH (placing the attribute 
before the prototype).

Index: libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
===================================================================
--- libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h	(revision 13035)
+++ libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h	(working copy)
@@ -30,7 +30,7 @@
    This file is part of the GNU C Library.
    Contributed by Maciej W. Rozycki <macro at ds2.pg.gda.pl>, 2000.  */
 static inline int
-_test_and_set (int *p, int v) __THROW
+__NTH (_test_and_set (int *p, int v))
 {
   int r, t;
 


-- 
Joseph S. Myers
joseph at codesourcery.com



More information about the uClibc mailing list