diff options
author | Remi Collet <remi@php.net> | 2017-03-29 07:25:01 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2017-03-29 07:25:01 +0200 |
commit | 012dc336a6ae01208c394994b648c221337bf81d (patch) | |
tree | a98bce697cfac1f2f9a87dd49f5114bd2032b8b1 /ext/sqlite3 | |
parent | d11211fb5379324e99dc67cdd7a0ec5031874ae7 (diff) | |
download | php-git-012dc336a6ae01208c394994b648c221337bf81d.tar.gz |
Fix buid with system libsqlite, see bug #74217
SQLITE_DETERMINISTIC only exists in recent version
e.g. missing on 3.7 which is the default on RHEL/CentOS-7
and probably others (wheezy have 3.7, jessie 3.8...)
Diffstat (limited to 'ext/sqlite3')
-rw-r--r-- | ext/sqlite3/sqlite3.c | 2 | ||||
-rw-r--r-- | ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 5a796e1bbf..f1ed93b06f 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -2283,7 +2283,9 @@ PHP_MINIT_FUNCTION(sqlite3) REGISTER_LONG_CONSTANT("SQLITE3_OPEN_READWRITE", SQLITE_OPEN_READWRITE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SQLITE3_OPEN_CREATE", SQLITE_OPEN_CREATE, CONST_CS | CONST_PERSISTENT); +#ifdef SQLITE_DETERMINISTIC REGISTER_LONG_CONSTANT("SQLITE3_DETERMINISTIC", SQLITE_DETERMINISTIC, CONST_CS | CONST_PERSISTENT); +#endif return SUCCESS; } diff --git a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt index 31fd42bc76..f9f0b5f33a 100644 --- a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt +++ b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt @@ -1,7 +1,10 @@ --TEST-- SQLite3::createFunction - Test with flags --SKIPIF-- -<?php require_once(__DIR__ . '/skipif.inc'); ?> +<?php +require_once(__DIR__ . '/skipif.inc'); +if (!defined('SQLITE3_DETERMINISTIC')) die('skip system sqlite is to old'); +?> --FILE-- <?php |