summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/ssp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-07 00:58:04 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-07 00:58:04 +0000
commit471547253f18dfd4f6a11cb786f97782f9861772 (patch)
tree75181c8bfe00bbb85836048c578266ebbabef134 /libc/sysdeps/linux/common/ssp.c
parent278d4ad42c88861ad673eaf06c3184b536f5e1af (diff)
move tv def back with gettimeofday() func
Diffstat (limited to 'libc/sysdeps/linux/common/ssp.c')
-rw-r--r--libc/sysdeps/linux/common/ssp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/ssp.c b/libc/sysdeps/linux/common/ssp.c
index 01b934b4a..31833cbb9 100644
--- a/libc/sysdeps/linux/common/ssp.c
+++ b/libc/sysdeps/linux/common/ssp.c
@@ -66,7 +66,6 @@ void __guard_setup(void) __attribute__ ((constructor));
void __guard_setup(void)
{
size_t size;
- struct timeval tv;
if (__guard != 0UL)
return;
@@ -111,9 +110,11 @@ void __guard_setup(void)
/* Everything failed? Or we are using a weakened model of the
* terminator canary */
-
- gettimeofday(&tv, NULL);
- __guard ^= tv.tv_usec ^ tv.tv_sec;
+ {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ __guard ^= tv.tv_usec ^ tv.tv_sec;
+ }
}
void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));