X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17a1ebd101f0653e69736416a2a28d0ada423141..46bde8dcf2245956223da69cce5bf93ba22a087e:/src/common/datetime.cpp diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 6622496e33..e00d14f757 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -392,9 +392,9 @@ 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) +#if wxUSE_UNIX && !defined(HAVE_STRPTIME_DECL) + // configure detected that we had strptime() but not its declaration, + // provide it ourselves extern "C" char *strptime(const char *, const char *, struct tm *); #endif