summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-20 15:41:30 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-20 16:29:53 +0200
commitc85ded763222295f9d24f8550b9428259bc36e86 (patch)
treee8acb885c62576c717ecd5311dd06782038daf30 /ext/pdo_pgsql
parent50af36a8aae73d313e3fc72d76e8640296a7e04e (diff)
downloadphp-git-c85ded763222295f9d24f8550b9428259bc36e86.tar.gz
Fix [-Wundef] warning in PDO PostgreSQL extension
Diffstat (limited to 'ext/pdo_pgsql')
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c4
-rw-r--r--ext/pdo_pgsql/pgsql_statement.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index f963c7e447..685a64e451 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -156,7 +156,7 @@ static int pgsql_lob_seek(php_stream *stream, zend_off_t offset, int whence,
zend_off_t *newoffset)
{
struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract;
-#if HAVE_PG_LO64 && ZEND_ENABLE_ZVAL_LONG64
+#if defined(HAVE_PG_LO64) && defined(ZEND_ENABLE_ZVAL_LONG64)
zend_off_t pos = lo_lseek64(self->conn, self->lfd, offset, whence);
#else
zend_off_t pos = lo_lseek(self->conn, self->lfd, offset, whence);
@@ -1060,7 +1060,7 @@ static PHP_METHOD(PDO, pgsqlGetNotify)
if (ms_timeout < 0) {
php_error_docref(NULL, E_WARNING, "Invalid timeout");
RETURN_FALSE;
-#if ZEND_ENABLE_ZVAL_LONG64
+#ifdef ZEND_ENABLE_ZVAL_LONG64
} else if (ms_timeout > INT_MAX) {
php_error_docref(NULL, E_WARNING, "Timeout was shrunk to %d", INT_MAX);
ms_timeout = INT_MAX;
diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c
index 1b728951f5..0edb3d7f8e 100644
--- a/ext/pdo_pgsql/pgsql_statement.c
+++ b/ext/pdo_pgsql/pgsql_statement.c
@@ -27,7 +27,7 @@
#include "pdo/php_pdo_driver.h"
#include "php_pdo_pgsql.h"
#include "php_pdo_pgsql_int.h"
-#if HAVE_NETINET_IN_H
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif