From c02deafc59a02cb4ac62c9a15d22c23f2ffadb8d Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Mon, 30 Mar 2015 23:36:44 +0300 Subject: [PATCH] struct-tm.patch: declare functions in case of redefine_extname --- libc/debian/changelog | 2 ++ libc/debian/patches/struct-tm.patch | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libc/debian/changelog b/libc/debian/changelog index f96a1b9..a7ab83e 100644 --- a/libc/debian/changelog +++ b/libc/debian/changelog @@ -1,6 +1,8 @@ libc (4.3+15) UNRELEASED; urgency=medium * XOPEM_SOURCE=600 by default + * Updated debian/patches/struct-tm.patch: declare functions in case of + redefine_extname -- Igor Pashev Mon, 30 Mar 2015 21:32:44 +0300 diff --git a/libc/debian/patches/struct-tm.patch b/libc/debian/patches/struct-tm.patch index 0da9e61..98a9b9d 100644 --- a/libc/debian/patches/struct-tm.patch +++ b/libc/debian/patches/struct-tm.patch @@ -41,19 +41,21 @@ Index: libc/usr/src/head/time.h #include #if (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ (_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__) -@@ -80,10 +80,17 @@ typedef int timer_t; +@@ -80,10 +80,21 @@ typedef int timer_t; #if defined(__EXTENSIONS__) || \ (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) --extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD, +extern struct tm *__gnu_gmtime_r(const time_t *_RESTRICT_KYWD, - struct tm *_RESTRICT_KYWD); --extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD, ++ struct tm *_RESTRICT_KYWD); +extern struct tm *__gnu_localtime_r(const time_t *_RESTRICT_KYWD, - struct tm *_RESTRICT_KYWD); ++ struct tm *_RESTRICT_KYWD); +#ifdef __PRAGMA_REDEFINE_EXTNAME +#pragma redefine_extname gmtime_r __gnu_gmtime_r +#pragma redefine_extname localtime_r __gnu_localtime_r + extern struct tm *gmtime_r(const time_t *_RESTRICT_KYWD, + struct tm *_RESTRICT_KYWD); + extern struct tm *localtime_r(const time_t *_RESTRICT_KYWD, + struct tm *_RESTRICT_KYWD); +#else /* __PRAGMA_REDEFINE_EXTNAME */ +#define gmtime_r __gnu_gmtime_r +#define localtime_r __gnu_localtime_r