summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/time.h2
-rw-r--r--time/tzfile.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/time/time.h b/time/time.h
index f6a26d919e..8c1aeaace6 100644
--- a/time/time.h
+++ b/time/time.h
@@ -267,10 +267,10 @@ extern int dysize __P ((int __year));
#endif
+#ifdef __USE_POSIX199309
/* Pause execution for a number of nanoseconds. */
extern int __nanosleep __P ((__const struct timespec *__requested_time,
struct timespec *__remaining));
-#ifdef __USE_POSIX199309
extern int nanosleep __P ((__const struct timespec *__requested_time,
struct timespec *__remaining));
#endif
diff --git a/time/tzfile.c b/time/tzfile.c
index e063d5d04f..663c02fda8 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -119,6 +119,7 @@ __tzfile_read (const char *file)
directory hierachy starting at TZDIR. */
if (__libc_enable_secure
&& ((*file == '/'
+ && (memcmp(file, TZDEFAULT, sizeof(TZDEFAULT) -1))
&& memcmp (file, default_tzdir, sizeof (default_tzdir) - 1))
|| strstr (file, "../") != NULL))
/* This test a certainly a bit too restrictive but it should