about summary refs log tree commit diff
path: root/src/time
diff options
context:
space:
mode:
Diffstat (limited to 'src/time')
-rw-r--r--src/time/__tz.c2
-rw-r--r--src/time/clock_gettime.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/time/__tz.c b/src/time/__tz.c
index 4ce20258..13cb1aed 100644
--- a/src/time/__tz.c
+++ b/src/time/__tz.c
@@ -27,7 +27,7 @@ static char old_tz_buf[32];
 static char *old_tz = old_tz_buf;
 static size_t old_tz_size = sizeof old_tz_buf;
 
-static int lock[2];
+static volatile int lock[2];
 
 static int getint(const char **p)
 {
diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c
index 799251d8..1572de0e 100644
--- a/src/time/clock_gettime.c
+++ b/src/time/clock_gettime.c
@@ -26,7 +26,7 @@ void *__vdsosym(const char *, const char *);
 int __clock_gettime(clockid_t clk, struct timespec *ts)
 {
 #ifdef VDSO_CGT_SYM
-	static int (*cgt)(clockid_t, struct timespec *);
+	static int (*volatile cgt)(clockid_t, struct timespec *);
 	if (!cgt) {
 		void *f = __vdsosym(VDSO_CGT_VER, VDSO_CGT_SYM);
 		if (!f) f = (void *)sc_clock_gettime;