aboutsummaryrefslogtreecommitdiff
path: root/string/strfry.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-03-12 00:38:37 +0000
committerUlrich Drepper <drepper@redhat.com>2002-03-12 00:38:37 +0000
commit89a3dd449a782f369c9ba2af1e7933b69323c4ea (patch)
treecef4a0789e79b03cff6328d0597c4f6e7e1a9c72 /string/strfry.c
parent14b2815be917c71d1310df760314581fa5073d07 (diff)
downloadglibc-89a3dd449a782f369c9ba2af1e7933b69323c4ea.zip
glibc-89a3dd449a782f369c9ba2af1e7933b69323c4ea.tar.gz
glibc-89a3dd449a782f369c9ba2af1e7933b69323c4ea.tar.bz2
Update.
2002-03-11 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/elf/configure.in: Fix comment. * sysdeps/sparc/sparc64/configure.in: New. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_load_address): Fix if .dynamic comes before .got. * config.h.in (SPARC64_DYNAMIC_BEFORE_GOT): Add. * sysdeps/sparc/sparc64/hp-timing.h (HP_TIMING_DIFF, HP_TIMING_ACCUM): Fix typos. * string/strfry.c: Add some more randomness to the seed. Patch by James A Morrison <ja2morri@student.math.uwaterloo.ca>. Patch by James Antill <james@anqd.org> [PR libc/2787].
Diffstat (limited to 'string/strfry.c')
-rw-r--r--string/strfry.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/string/strfry.c b/string/strfry.c
index 4bb2255..112dd4a 100644
--- a/string/strfry.c
+++ b/string/strfry.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1996, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1999, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
+#include <unistd.h>
char *
strfry (char *string)
@@ -31,7 +32,8 @@ strfry (char *string)
{
static char state[32];
rdata.state = NULL;
- __initstate_r (time ((time_t *) NULL), state, sizeof (state), &rdata);
+ __initstate_r (time ((time_t *) NULL) ^ getpid (),
+ state, sizeof (state), &rdata);
init = 1;
}