Skip to content

Instantly share code, notes, and snippets.

/gist:5033825
Created Feb 25, 2013

Embed
What would you like to do?
php_cli_server.c win64 patch
--- 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
You can’t perform that action at this time.