Skip to content

Commit c85ded7

Browse files
committed
Fix [-Wundef] warning in PDO PostgreSQL extension
1 parent 50af36a commit c85ded7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/pdo_pgsql/pgsql_driver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static int pgsql_lob_seek(php_stream *stream, zend_off_t offset, int whence,
156156
zend_off_t *newoffset)
157157
{
158158
struct pdo_pgsql_lob_self *self = (struct pdo_pgsql_lob_self*)stream->abstract;
159-
#if HAVE_PG_LO64 && ZEND_ENABLE_ZVAL_LONG64
159+
#if defined(HAVE_PG_LO64) && defined(ZEND_ENABLE_ZVAL_LONG64)
160160
zend_off_t pos = lo_lseek64(self->conn, self->lfd, offset, whence);
161161
#else
162162
zend_off_t pos = lo_lseek(self->conn, self->lfd, offset, whence);
@@ -1060,7 +1060,7 @@ static PHP_METHOD(PDO, pgsqlGetNotify)
10601060
if (ms_timeout < 0) {
10611061
php_error_docref(NULL, E_WARNING, "Invalid timeout");
10621062
RETURN_FALSE;
1063-
#if ZEND_ENABLE_ZVAL_LONG64
1063+
#ifdef ZEND_ENABLE_ZVAL_LONG64
10641064
} else if (ms_timeout > INT_MAX) {
10651065
php_error_docref(NULL, E_WARNING, "Timeout was shrunk to %d", INT_MAX);
10661066
ms_timeout = INT_MAX;

ext/pdo_pgsql/pgsql_statement.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "pdo/php_pdo_driver.h"
2828
#include "php_pdo_pgsql.h"
2929
#include "php_pdo_pgsql_int.h"
30-
#if HAVE_NETINET_IN_H
30+
#ifdef HAVE_NETINET_IN_H
3131
#include <netinet/in.h>
3232
#endif
3333

0 commit comments

Comments
 (0)