summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/libpthread_no-inline.patch125
2 files changed, 127 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index bf4336f3..5cb0c4d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ hurd (20070606-2+SVN) UNRELEASED; urgency=low
* debian/patches/pfinet_-fno-strict-aliasing.patch: New patch, adding
-fno-strict-aliasing to pfinet's CFLAGS to fix compilation with gcc-4.2,
taken from CVS.
+ * debian/patches/patches/libpthread_no-inline.patch: New patch, removes
+ extern inlines to fix g++ and gettext FTBFS, by Samuel Thibault.
-- Michael Banck <mbanck@debian.org> Thu, 26 Jul 2007 15:15:02 +0200
diff --git a/debian/patches/libpthread_no-inline.patch b/debian/patches/libpthread_no-inline.patch
new file mode 100644
index 00000000..e0634e1f
--- /dev/null
+++ b/debian/patches/libpthread_no-inline.patch
@@ -0,0 +1,125 @@
+Index: libpthread/sysdeps/generic/bits/mutex.h
+===================================================================
+RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/bits/mutex.h,v
+retrieving revision 1.4
+diff -u -p -r1.4 mutex.h
+--- libpthread/sysdeps/generic/bits/mutex.h 4 Mar 2007 00:05:21 -0000 1.4
++++ libpthread/sysdeps/generic/bits/mutex.h 2 Aug 2007 17:41:05 -0000
+@@ -62,78 +62,6 @@ struct __pthread_mutex
+ #include <errno.h>
+ #include <stddef.h>
+
+-#ifdef __USE_EXTERN_INLINES
+-
+-# ifndef _EXTERN_INLINE
+-# define _EXTERN_INLINE extern __inline
+-# endif
+-
+-_EXTERN_INLINE int
+-pthread_mutex_init (struct __pthread_mutex *__restrict __mutex,
+- const pthread_mutexattr_t *__restrict attr)
+-{
+- struct __pthread_mutex initialized_mutex = __PTHREAD_MUTEX_INITIALIZER;
+-
+- extern int _pthread_mutex_init (struct __pthread_mutex *,
+- const pthread_mutexattr_t *);
+-
+- if (attr)
+- return _pthread_mutex_init (__mutex, attr);
+-
+- *__mutex = initialized_mutex;
+- return 0;
+-}
+-
+-_EXTERN_INLINE int
+-pthread_mutex_destroy (struct __pthread_mutex *__mutex)
+-{
+- extern int _pthread_mutex_destroy (struct __pthread_mutex *);
+-
+- if (__mutex->attr || __mutex->data)
+- return _pthread_mutex_destroy (__mutex);
+-
+- return 0;
+-}
+-
+-_EXTERN_INLINE int
+-__pthread_mutex_lock (struct __pthread_mutex *__mutex)
+-{
+- extern int _pthread_mutex_lock (struct __pthread_mutex *);
+-
+- if (__mutex->attr == NULL
+- && __mutex->data == NULL
+- && __pthread_spin_trylock (&__mutex->__held) == 0)
+- return 0;
+-
+- return _pthread_mutex_lock (__mutex);
+-}
+-
+-extern __inline int
+-__pthread_mutex_trylock (struct __pthread_mutex *__mutex)
+-{
+- extern int _pthread_mutex_trylock (struct __pthread_mutex *);
+-
+- if (__mutex->attr == NULL
+- && __mutex->data == NULL)
+- return __pthread_spin_trylock (&__mutex->__held);
+-
+- return _pthread_mutex_trylock (__mutex);
+-}
+-
+-extern __inline int
+-pthread_mutex_lock (struct __pthread_mutex *__mutex)
+-{
+- return __pthread_mutex_lock (__mutex);
+-}
+-
+-extern __inline int
+-pthread_mutex_trylock (struct __pthread_mutex *__mutex)
+-{
+- return __pthread_mutex_trylock (__mutex);
+-}
+-
+-#endif /* Use extern inlines. */
+-
+ #endif
+
+ #endif /* bits/mutex.h */
+Index: libpthread/sysdeps/generic/bits/rwlock.h
+===================================================================
+RCS file: /cvsroot/hurd/hurd/libpthread/sysdeps/generic/bits/rwlock.h,v
+retrieving revision 1.4
+diff -u -p -r1.4 rwlock.h
+--- libpthread/sysdeps/generic/bits/rwlock.h 24 Jun 2007 15:11:52 -0000 1.4
++++ libpthread/sysdeps/generic/bits/rwlock.h 2 Aug 2007 17:41:05 -0000
+@@ -43,31 +43,4 @@ struct __pthread_rwlock
+ { __SPIN_LOCK_INITIALIZER, __SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0 }
+
+
+-_EXTERN_INLINE int
+-pthread_rwlock_init (struct __pthread_rwlock *__restrict __rwlock,
+- const struct __pthread_rwlockattr *__restrict __attr)
+-{
+- struct __pthread_rwlock initialized_rwlock = __PTHREAD_RWLOCK_INITIALIZER;
+- extern int _pthread_rwlock_init (struct __pthread_rwlock *,
+- const struct __pthread_rwlockattr *);
+-
+- if (__attr)
+- return _pthread_rwlock_init (__rwlock, __attr);
+-
+- *__rwlock = initialized_rwlock;
+- return 0;
+-}
+-
+-_EXTERN_INLINE int
+-pthread_rwlock_destroy (struct __pthread_rwlock *__rwlock)
+-{
+- extern int _pthread_rwlock_destroy (struct __pthread_rwlock *);
+-
+- if (__rwlock->__attr
+- || __rwlock->__data)
+- return _pthread_rwlock_destroy (__rwlock);
+-
+- return 0;
+-}
+-
+ #endif /* bits/rwlock.h */