From 10455d43fef041309ce0613fa792c635dd71e3a8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 21 Nov 2019 15:36:18 +0100 Subject: patch 8.1.2326: cannot parse a date/time string Problem: Cannot parse a date/time string. Solution: Add strptime(). (Stephen Wall, closes #) --- src/os_unix.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/os_unix.h') diff --git a/src/os_unix.h b/src/os_unix.h index 618c0e970..a7a0c841f 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -127,9 +127,16 @@ # endif #endif +// on some systems time.h should not be included together with sys/time.h #if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME) -# include /* on some systems time.h should not be - included together with sys/time.h */ +// Needed for strptime() +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE +# endif +# ifndef __USE_XOPEN +# define __USE_XOPEN +# endif +# include #endif #ifdef HAVE_SYS_TIME_H # include -- cgit v1.2.1