diff options
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/connections.c | 12 | ||||
-rw-r--r-- | nscd/nscd.c | 13 |
2 files changed, 10 insertions, 15 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 diff --git a/nscd/nscd.c b/nscd/nscd.c index 0ef54bcf08..0cc1818d9d 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -502,16 +502,3 @@ write_pid (const char *file) return 0; } - - -/* This is an ugly hack which prevents getaddrinfo from being dragged - into nscd. There currently is no special getaddrinfo version for - use in nscd. In case it should be necessary such a version must be - created and this dummy version should be removed. */ -extern void getaddrinfo (void) __attribute ((visibility ("hidden"))); - -void -getaddrinfo (void) -{ - abort (); -} |