1 --- libc/sysdeps/unix/sysv/linux/dl-osinfo.h.jj 2002-12-10 09:09:24.000000000 -0500
2 +++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h 2003-05-20 17:05:37.000000000 -0400
4 #include <sys/sysctl.h>
5 #include <sys/utsname.h>
6 #include "kernel-features.h"
10 # define MIN(a,b) (((a)<(b))?(a):(b))
11 @@ -37,8 +38,29 @@ dl_fatal (const char *str)
18 +__attribute__ ((always_inline))
19 +dl_redhat_nptl_check (const char *cp)
21 + cp = strchr (cp, 'n');
22 + if (__builtin_expect (cp == NULL || cp[1] != 'p'
23 + || cp[2] != 't' || cp[3] != 'l', 0)
24 + && GLRO(dl_osversion) < 0x20545
25 + && GLRO(dl_osversion) > 0x20413)
27 +#ifdef __NR_set_tid_address
28 + INTERNAL_SYSCALL_DECL (err);
30 + ret = INTERNAL_SYSCALL (set_tid_address, err, 1, NULL);
31 + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
33 + GLRO(dl_osversion) = 0x20413;
37 +#define dl_redhat_nptl_check(cp)
40 #define DL_SYSDEP_OSCHECK(FATAL) \
42 @@ -105,5 +127,6 @@ dl_fatal (const char *str)
43 FATAL ("FATAL: kernel too old\n"); \
45 GLRO(dl_osversion) = version; \
46 + dl_redhat_nptl_check (cp); \