]> git.saurik.com Git - wxWidgets.git/commitdiff
quick and dirty fix for strptime()
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 29 Jul 2003 23:40:03 +0000 (23:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 29 Jul 2003 23:40:03 +0000 (23:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp

index ac737d6322f9f85c2327859c94d1bd5c647c4c93..77b81dda89806d55559fddf25c2198d33e647e36 100644 (file)
@@ -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)