diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-10-04 16:35:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-10-04 16:35:54 +0000 |
commit | 3078cba2f7272dab753c45b733af2e693e86d83c (patch) | |
tree | 1bd3c12657d1fb27b372907ee74798ef04023ba8 /nscd/connections.c | |
parent | 91a3b2ad2e819a7fa14b8f9773856e4303a8c99a (diff) | |
download | glibc-3078cba2f7272dab753c45b733af2e693e86d83c.tar.gz glibc-3078cba2f7272dab753c45b733af2e693e86d83c.tar.xz glibc-3078cba2f7272dab753c45b733af2e693e86d83c.zip |
Update.
* nscd/connections.c (start_threads): Use sysconf in case _POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero. * nscd/nscd.c: Remove getaddrinfo stub definition.
Diffstat (limited to 'nscd/connections.c')
-rw-r--r-- | nscd/connections.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c index 45042beaab..aae798ed47 100644 --- a/nscd/connections.c +++ b/nscd/connections.c @@ -1455,10 +1455,18 @@ start_threads (void) pthread_condattr_t condattr; pthread_condattr_init (&condattr); -#if _POSIX_CLOCK_SELECTION >= 0 && _POSIX_MONOTONIC_CLOCK >= 0 +#if defined _POSIX_CLOCK_SELECTION && _POSIX_CLOCK_SELECTION >= 0 \ + && defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 /* Determine whether the monotonous clock is available. */ struct timespec dummy; - if (clock_getres (CLOCK_MONOTONIC, &dummy) == 0 + if ( +# if _POSIX_MONOTONIC_CLOCK == 0 + sysconf (_SC_MONOTONIC_CLOCK) > 0 && +# endif +# if _POSIX_CLOCK_SELECTION == 0 + sysconf (_SC_CLOCK_SELECTION) > 0 && +# endif + clock_getres (CLOCK_MONOTONIC, &dummy) == 0 && pthread_condattr_setclock (&condattr, CLOCK_MONOTONIC) == 0) timeout_clock = CLOCK_MONOTONIC; #endif |