summaryrefslogtreecommitdiff
path: root/ext/oci8/php_oci8_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8/php_oci8_int.h')
-rw-r--r--ext/oci8/php_oci8_int.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h
index 90448d36ea..8455277e59 100644
--- a/ext/oci8/php_oci8_int.h
+++ b/ext/oci8/php_oci8_int.h
@@ -545,6 +545,14 @@ int php_oci_unregister_taf_callback(php_oci_connection *connection);
#define OCI_G(v) (oci_globals.v)
#endif
+/* Allow install from PECL on PHP < 7.3 */
+#ifndef GC_ADDREF
+# define GC_ADDREF(p) (++GC_REFCOUNT(p))
+#endif
+#ifndef GC_DELREF
+# define GC_DELREF(p) (GC_REFCOUNT(p)--)
+#endif
+
ZEND_EXTERN_MODULE_GLOBALS(oci)
# endif /* !PHP_OCI8_INT_H */