diff -urN src.orig/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c src/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c --- src.orig/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c 2004-06-24 19:11:07.000000000 +0800 +++ src/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c 2004-06-24 19:22:40.000000000 +0800 @@ -70,7 +70,8 @@ performed if we would not block at all simply moving the test to the front is no option. Replicating all the code is costly while this test is not. */ - if (__builtin_expect (abstime->tv_nsec >= 1000000000, 0)) + if (__builtin_expect (abstime->tv_nsec >= 1000000000 + || abstime->tv_sec < 0, 0)) { result = EINVAL; break; diff -urN src.orig/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c src/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c --- src.orig/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c 2004-06-24 19:11:07.000000000 +0800 +++ src/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c 2004-06-24 19:23:38.000000000 +0800 @@ -61,7 +61,8 @@ performed if we would not block at all simply moving the test to the front is no option. Replicating all the code is costly while this test is not. */ - if (abstime->tv_nsec >= 1000000000) + if (__builtin_expect (abstime->tv_nsec >= 1000000000 + || abstime->tv_sec < 0, 0)) { result = EINVAL; break;