Skip to content

Commit 6a04698

Browse files
committed
use VIPS_SONAME, if we can
see libvips/php-vips#27
1 parent ed9f424 commit 6a04698

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
vips extension changelog
22

3+
dev
4+
---
5+
* Use VIPS_SONAME, if we can
6+
37
Version 1.0.4 (2016-12-30)
8+
--------------------------
49
* Improve graceful fix from 1.0.3, see https://github.com/jcupitt/php-vips/issues/27
510
* Better notes section in package.xml, see https://github.com/jcupitt/php-vips/issues/28
611

vips.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,12 @@ PHP_MINIT_FUNCTION(vips)
16461646
* We can't just load .so, that's only installed with libvips-dev,
16471647
* which may not be present at runtime.
16481648
*/
1649-
if (!dlopen("libvips.so.42", RTLD_LAZY | RTLD_NODELETE)) {
1649+
#ifdef VIPS_SONAME
1650+
if (!dlopen(VIPS_SONAME, RTLD_LAZY | RTLD_NODELETE))
1651+
#else /*!VIPS_SONAME*/
1652+
if (!dlopen("libvips.so.42", RTLD_LAZY | RTLD_NODELETE))
1653+
#endif /*VIPS_SONAME*/
1654+
{
16501655
sapi_module.sapi_error(E_WARNING, "php-vips-ext: unable to lock "
16511656
"libvips -- graceful may be unreliable");
16521657
}

0 commit comments

Comments
 (0)