[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] [PATCH] fix build with linuxthreads
- To: patches@xxxxxxxxxx
- Subject: Re: [patches] [PATCH] fix build with linuxthreads
- From: Aurelien Jarno <aurelien@xxxxxxxxxxx>
- Date: Mon, 2 Mar 2009 01:06:57 +0100
On Sun, Mar 01, 2009 at 02:37:18PM +0100, Aurelien Jarno wrote:
> Hi,
>
> The patch below fixes a problem that appears when using EGLIBC with
> linuxthreads. The linuxthreads version of __libc_lock_lock and
> __libc_lock_unlock functions includes a semi-colon at the end (as
> some of the NPTL functions), so brackets can't be used. Use braces
> instead.
>
Actually this patch fixes linuxthreads, but breaks NPTL. I think the
best is simply to remove the brackets, after all the function was called
that way before the #define changes.
Please find and updated patch below.
Best regards,
Aurelien
2009-03-01 Aurelien Jarno <aurelien@xxxxxxxxxxx>
* nss/nsswitch.c (lock_nsswitch, unlock_nsswitch): remove brackets.
--- a/nss/nsswitch.c (revision 8009)
+++ b/nss/nsswitch.c (working copy)
@@ -84,8 +84,8 @@
__libc_lock_define_initialized (static, lock)
-#define lock_nsswitch (__libc_lock_lock (lock))
-#define unlock_nsswitch (__libc_lock_unlock (lock))
+#define lock_nsswitch __libc_lock_lock (lock)
+#define unlock_nsswitch __libc_lock_unlock (lock)
#if !defined DO_STATIC_NSS || defined SHARED
/* String with revision number of the shared object files. */
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@xxxxxxxxxxx http://www.aurel32.net