pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [patch] php broken on Linux
Sorry, must have attached the wrong file (similar, but does not
compile).
With this patch, I can compile php55 on Linux again (Ubuntu 14.04 in
this case). For the time being, I keep the patch in my LOCALPATCHES dir.
Now for www/ap-php (ap24-php55): it includes lang/php55/Makefile.php,
thereby setting DISTINFO_FILE and PATCHDIR, so it uses the php55 sources
and patches. But alas, it does not use my patch which sits in
$LOCALPATCHES/lang/php55.
While copying the same patch also under LOCALPATCHES/www/ap-php does
work, this is quirky - the patch is for a specific php version.
Currently I have the pkgsrc tree and the LOCALPATCHES tree on a
fileserver, there might be conflicts when different buildhosts use
different php versions.
Is there a mechanism to point bmake to the right LOCALPATCHES subdir?
Regards
Matthias
On Tue, Apr 19, 2016 at 10:55:43PM +0200, Matthias Ferdinand wrote:
> Hi,
>
> there is a recent patch in php55, php56 and php70
> (patch-ext_standard_php__dns.h) to address a memory leak.
> It replaces a call to res_nclose() with a call to res_ndestroy(), which
> is not available in glibc.
>
> Attached is an improved version of that patch, using res_ndestroy() only
> on non-glibc systems.
>
> I don't know if the memory leak existed with glibc and if I just
> reintroduced it :-)
>
>
> Regards
> Matthias
> $NetBSD$
>
> --- ext/standard/php_dns.h.orig 2016-03-29 16:08:54.000000000 +0000
> +++ ext/standard/php_dns.h
> @@ -32,9 +32,15 @@
> #elif defined(HAVE_RES_NSEARCH)
> #define php_dns_search(res, dname, class, type, answer, anslen) \
> res_nsearch(res, dname, class, type, answer, anslen);
> +#ifdef __GLIBC__
> #define php_dns_free_handle(res) \
> res_nclose(res); \
> php_dns_free_res(*res)
> +#else
> +#define php_dns_free_handle(res) \
> + res_ndestroy(res); \
> + php_dns_free_res(*res)
> +#endif
>
> #elif defined(HAVE_RES_SEARCH)
> #define php_dns_search(res, dname, class, type, answer, anslen) \
$NetBSD$
--- ext/standard/php_dns.h.orig 2016-04-26 11:38:42.425714011 +0000
+++ ext/standard/php_dns.h
@@ -32,9 +32,15 @@
#elif defined(HAVE_RES_NSEARCH)
#define php_dns_search(res, dname, class, type, answer, anslen) \
res_nsearch(res, dname, class, type, answer, anslen);
+#ifdef __GLIBC__
+#define php_dns_free_handle(res) \
+ res_nclose(res); \
+ php_dns_free_res(*res)
+#else
#define php_dns_free_handle(res) \
res_ndestroy(res); \
php_dns_free_res(*res)
+#endif
#elif defined(HAVE_RES_SEARCH)
#define php_dns_search(res, dname, class, type, answer, anslen) \
Home |
Main Index |
Thread Index |
Old Index