summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/nscd_setup_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/nscd_setup_thread.c')
-rw-r--r--sysdeps/unix/sysv/linux/nscd_setup_thread.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/nscd_setup_thread.c b/sysdeps/unix/sysv/linux/nscd_setup_thread.c
index 56e23dc831..c29f972339 100644
--- a/sysdeps/unix/sysv/linux/nscd_setup_thread.c
+++ b/sysdeps/unix/sysv/linux/nscd_setup_thread.c
@@ -23,7 +23,7 @@
#include <sysdep.h>
-void
+int
setup_thread (struct database_dyn *db)
{
#ifdef __NR_set_tid_address
@@ -31,7 +31,7 @@ setup_thread (struct database_dyn *db)
char buf[100];
if (confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, sizeof (buf)) >= sizeof (buf)
|| strncmp (buf, "NPTL", 4) != 0)
- return;
+ return 0;
/* Do not try this at home, kids. We play with the SETTID address
even thought the process is multi-threaded. This can only work
@@ -43,6 +43,8 @@ setup_thread (struct database_dyn *db)
/* We know the kernel can reset this field when nscd terminates.
So, set the field to a nonzero value which indicates that nscd
is certainly running and clients can skip the test. */
- db->head->nscd_certainly_running = 1;
+ return db->head->nscd_certainly_running = 1;
#endif
+
+ return 0;
}