From: Dmitry Marakasov <> Date: Sat, 3 Aug 2019 11:34:42 +0000 (+0100) Subject: Fix #703: Fix build on non-glibc platforms X-Git-Tag: v1.5.1~5 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=d7d0133043064971077c9e1effa4edd35aaaf902 Fix #703: Fix build on non-glibc platforms https://github.com/BestImageViewer/geeqie/pull/703 --- diff --git a/src/pan-view/pan-util.c b/src/pan-view/pan-util.c index 3fd5cc89..317660bb 100644 --- a/src/pan-view/pan-util.c +++ b/src/pan-view/pan-util.c @@ -82,6 +82,12 @@ gint pan_date_value(time_t d, PanDateLengthType length) return -1; } +#if defined(__GLIBC_PREREQ) +# if __GLIBC_PREREQ(2, 27) +# define HAS_GLIBC_STRFTIME_EXTENSIONS +# endif +#endif + gchar *pan_date_value_string(time_t d, PanDateLengthType length) { struct tm td; @@ -99,7 +105,7 @@ gchar *pan_date_value_string(time_t d, PanDateLengthType length) format = "%A %e"; break; case PAN_DATE_LENGTH_MONTH: -#if __GLIBC_PREREQ(2, 27) +#if defined(HAS_GLIBC_STRFTIME_EXTENSIONS) || defined(__FreeBSD__) format = "%OB %Y"; #else format = "%B %Y";