From e2620fdadc695f51cd9632f8075b7544a725f99c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 Jul 2003 23:40:03 +0000 Subject: [PATCH] quick and dirty fix for strptime() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datetime.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index ac737d6322..77b81dda89 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -344,6 +344,12 @@ static wxString CallStrftime(const wxChar *format, const tm* tm) #ifdef HAVE_STRPTIME +// glibc2 doesn't define this in the headers unless _XOPEN_SOURCE is defined +// which, unfortunately, wreaks havoc elsewhere +#if defined(__GLIBC__) && (__GLIBC__ == 2) + extern "C" char *strptime(const char *, const char *, struct tm *); +#endif + // Unicode-friendly strptime() wrapper static const wxChar * CallStrptime(const wxChar *input, const char *fmt, tm *tm)