$NetBSD: patch-ab,v 1.8 2018/01/29 12:47:08 jperkin Exp $

For localtime_r, safer than adjusting the _XOPEN_SOURCE earlier in the file.

--- libedataserver/e-time-utils.c.orig	2011-04-21 19:35:37.000000000 +0000
+++ libedataserver/e-time-utils.c
@@ -9,10 +9,13 @@
  */
 
 #include <config.h>
+#if !defined(__sun) || (!defined(_XOPEN_SOURCE) && (__STDC_VERSION__-0 < 199901L))
 #define _XOPEN_SOURCE
+#endif
 
 /* For tm_gmtoff */
 #define _BSD_SOURCE
+#define _NETBSD_SOURCE
 
 #include <time.h>
 #include <sys/time.h>
