<html><head></head><body>Hi,<br><br>I don't see any reason to diverge from the existing strategy of including or not system headers here. Only Win64 needs this hack if MingW is not fixed.<br><br><div class="gmail_quote">Le 16 juillet 2019 10:26:43 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">So now we include search.h for every file we compile.<br><br>Co-authored-by: Rémi Denis-Courmont <remi@remlab.net><hr> include/vlc_fixups.h | 10 +++++++++-<br> 1 file changed, 9 insertions(+), 1 deletion(-)<br><br>diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h<br>index 2164f690b1..6822feeaeb 100644<br>--- a/include/vlc_fixups.h<br>+++ b/include/vlc_fixups.h<br>@@ -489,10 +489,18 @@ void *tdelete( const void *key, void **rootp, int(*cmp)(const void *, const void<br> void twalk( const void *root, void(*action)(const void *nodep, VISIT which, int depth) );<br> void *lfind( const void *key, const void *base, size_t *nmemb,<br>              size_t size, int(*cmp)(const void *, const void *) );<br>-#endif /* HAVE_SEARCH_H */<br>+#else /* !HAVE_SEARCH_H */<br>+#include <search.h><br>+#endif /* !HAVE_SEARCH_H */<br> #ifndef HAVE_TDESTROY<br> void tdestroy( void *root, void (*free_node)(void *nodep) );<br> #endif<br>+#ifdef _WIN64<br>+/* the Win32 prorotype of lfind() expects an unsigned* for 'nelp' */<br>+# define lfind(a,b,c,d,e) \<br>+         lfind(a,b, &(unsigned){ (*(c) > UINT_MAX) ? UINT_MAX : *(c) }, d,e)<br>+#endif /* _WIN64 */<br>+<br> <br> /* Random numbers */<br> #ifndef HAVE_NRAND48</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>