Permalink
Browse files

Make sure to use POSIX strerror_r

Apparently in some setups the PHP header files define _GNU_SOURCE,
which has the effect of forcing the use of a variant of strerror_r
which is different from what is expected. This works-around the problem
by including the POSIX header files first.
  • Loading branch information...
1 parent f0b92c6 commit f486fe68547b1206dd631ee8d0536f295446c344 @lcastelli committed Mar 19, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 php_chdb.c
View
@@ -1,3 +1,7 @@
+// Include these first to ensure that we get the POSIX strerror_r
+#include <stdio.h>
+#include <string.h>
+
#include "php_chdb.h"
#ifdef ZTS
@@ -7,8 +11,6 @@
#include <php_ini.h>
#include <ext/standard/info.h>
#include <Zend/zend_exceptions.h>
-#include <stdio.h>
-#include <string.h>
#include "chdb.h"
#ifdef COMPILE_DL_CHDB

0 comments on commit f486fe6

Please sign in to comment.