summaryrefslogtreecommitdiff
path: root/ext/standard/datetime.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-08-24 11:06:02 +0000
committerAntony Dovgal <tony2001@php.net>2006-08-24 11:06:02 +0000
commit0584dc011c38dc04a1297360509454619aaf929d (patch)
tree4861abbd442bce88f8070a71876fbbc297991f6a /ext/standard/datetime.c
parentc42b3bf689389ae0f22448183c77dc96c7114bd2 (diff)
downloadphp-git-0584dc011c38dc04a1297360509454619aaf929d.tar.gz
MFH: fix segfault in strptime() on 64bit Linuxes, caused by the missing declaration
Diffstat (limited to 'ext/standard/datetime.c')
-rw-r--r--ext/standard/datetime.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 7e2a5b4434..ddb7249b35 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -20,10 +20,6 @@
/* $Id$ */
-#if HAVE_STRPTIME
-#define _XOPEN_SOURCE
-#endif
-
#include "php.h"
#include "zend_operators.h"
#include "datetime.h"
@@ -85,6 +81,10 @@ PHPAPI char *php_std_date(time_t t TSRMLS_DC)
#if HAVE_STRPTIME
+#ifndef HAVE_STRPTIME_DECL_FAILS
+char *strptime(const char *s, const char *format, struct tm *tm);
+#endif
+
/* {{{ proto string strptime(string timestamp, string format)
Parse a time/date generated with strftime() */
PHP_FUNCTION(strptime)