Created
February 25, 2013 22:12
-
-
Save anonymous/5033825 to your computer and use it in GitHub Desktop.
php_cli_server.c win64 patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- php_cli_server.orig.c 2013-02-23 13:15:50.289295800 +0530 | |
+++ php_cli_server.c 2013-02-23 13:16:37.089738700 +0530 | |
@@ -628,9 +628,11 @@ | |
{ | |
struct timeval tv; | |
struct tm tm; | |
+ time_t time; | |
char buf[52]; | |
gettimeofday(&tv, NULL); | |
- php_localtime_r(&tv.tv_sec, &tm); | |
+ time = tv.tv_sec; | |
+ php_localtime_r(&time, &tm); | |
php_asctime_r(&tm, buf); | |
{ | |
size_t l = strlen(buf); | |
@@ -2396,9 +2398,11 @@ | |
{ | |
struct timeval tv; | |
struct tm tm; | |
+ time_t time; | |
char buf[52]; | |
gettimeofday(&tv, NULL); | |
- php_localtime_r(&tv.tv_sec, &tm); | |
+ time = tv.tv_sec; | |
+ php_localtime_r(&time, &tm); | |
php_asctime_r(&tm, buf); | |
printf("PHP %s Development Server started at %s" | |
"Listening on http://%s\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment