aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-10-04 16:35:54 +0000
committerUlrich Drepper <drepper@redhat.com>2004-10-04 16:35:54 +0000
commit3078cba2f7272dab753c45b733af2e693e86d83c (patch)
tree1bd3c12657d1fb27b372907ee74798ef04023ba8 /nscd
parent91a3b2ad2e819a7fa14b8f9773856e4303a8c99a (diff)
downloadglibc-3078cba2f7272dab753c45b733af2e693e86d83c.tar
glibc-3078cba2f7272dab753c45b733af2e693e86d83c.tar.gz
glibc-3078cba2f7272dab753c45b733af2e693e86d83c.tar.bz2
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')
-rw-r--r--nscd/connections.c12
-rw-r--r--nscd/nscd.c13
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 ();
-}