aboutsummaryrefslogtreecommitdiff
path: root/nscd/nscd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-10 23:56:29 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-10 23:56:29 +0000
commit3418007ed675c2ab8a9885bcd101752246f9c2d8 (patch)
tree1a0d2e7f986886c77389bf78250eff720810c6cc /nscd/nscd.c
parent9b2dc5158996348484428ef6698186628152da3f (diff)
downloadglibc-3418007ed675c2ab8a9885bcd101752246f9c2d8.tar
glibc-3418007ed675c2ab8a9885bcd101752246f9c2d8.tar.gz
glibc-3418007ed675c2ab8a9885bcd101752246f9c2d8.tar.bz2
glibc-3418007ed675c2ab8a9885bcd101752246f9c2d8.zip
Update.
2004-09-10 Ulrich Drepper <drepper@redhat.com> * nscd/nscd.c (pagesize_m1): New variable. (main): Initialize it. * nscd/nscd.h: Declare pagesize_m1. * nscd/hstcache.c: Pass correctly aligned address to msync. * nscd/grpcache.c: Likewise. * nscd/pwdcache.c: Likewise.
Diffstat (limited to 'nscd/nscd.c')
-rw-r--r--nscd/nscd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index f6b22d4179..5c5c15598b 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -76,6 +76,8 @@ static const char *conffile = _PATH_NSCDCONF;
time_t start_time;
+uintptr_t pagesize_m1;
+
static int check_pid (const char *file);
static int write_pid (const char *file);
@@ -155,6 +157,9 @@ main (int argc, char **argv)
/* Remember when we started. */
start_time = time (NULL);
+ /* Determine page size. */
+ pagesize_m1 = getpagesize () - 1;
+
/* Behave like a daemon. */
if (go_background)
{