nixpkgs
ffb99acc - php74.extensions.iconv: fix error signalling

Commit
4 years ago
php74.extensions.iconv: fix error signalling The configure script checks whether iconv supports errno. Unfortunately, on PHP < 8, the test program includes $PHP_ICONV_H_PATH, which defaults to FHS path so it fails to build: conftest.c:13:10: fatal error: /usr/include/iconv.h: No such file or directory 13 | #include </usr/include/iconv.h> | ^~~~~~~~~~~~~~~~~~~~~~ That causes the feature check to report a false negative, leading PHP to use a degraded code that returns PHP_ICONV_ERR_UNKNOWN when error occurs, breaking granular error handling in applications. To prevent this, let’s just include <iconv.h>. PHP 8 just uses include path so the detection works there: https://github.com/php/php-src/commit/7bd1d703411e1e4b1f663f0cb06af619eea04b42 (cherry picked from commit 024243bac4612c62ef5be676818ed2465edae27f)
Author
Committer
Parents
Loading