diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-04-28 18:33:19 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-04-29 10:40:59 +0200 |
commit | 67f9b0b754654e76ef8d5b5539fb520541092950 (patch) | |
tree | 304f2322af2e67512047d3832024391db3f79eaa /ext/pdo_pgsql | |
parent | b1b98e08d0ad4bbbb213c002188ffa47075a8b0d (diff) | |
download | php-git-67f9b0b754654e76ef8d5b5539fb520541092950.tar.gz |
Fix #79532: sizeof off_t can be wrong
We have to actually determine the proper `SIZEOF_OFF_T`.
Interestingly, it is `4` on Windows x64.
We also have to prevent the redefinition in pg_config.h. The clean
solution would likely be to not include pg_config.h at all, but that's
out of scope for BC reasons for now.
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r-- | ext/pdo_pgsql/pdo_pgsql.c | 1 | ||||
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index 8d60fe420b..8d4158198d 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -29,6 +29,7 @@ #include "php_pdo_pgsql_int.h" #ifdef HAVE_PG_CONFIG_H +#undef SIZEOF_OFF_T #include <pg_config.h> #endif diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index b6f008071c..403bfd611a 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -31,6 +31,7 @@ #include "pdo/php_pdo_driver.h" #include "pdo/php_pdo_error.h" #include "ext/standard/file.h" +#undef SIZEOF_OFF_T #include "pg_config.h" /* needed for PG_VERSION */ #include "php_pdo_pgsql.h" #include "php_pdo_pgsql_int.h" |