[vlc-devel] [PATCH] pulse: Fix linking on OSX

David Fuhrmann david.fuhrmann at gmail.com
Sun Oct 2 08:37:39 CEST 2016


> Am 02.10.2016 um 05:00 schrieb Vittorio Giovara <vittorio.giovara at gmail.com>:
> 
> On Sat, Oct 1, 2016 at 9:59 PM, Rémi Denis-Courmont <remi at remlab.net <mailto:remi at remlab.net>> wrote:
>> Le samedi 1 octobre 2016, 21:41:57 Vittorio Giovara a écrit :
>>> ---
>>> I am not sure this is the right way, but the default configure enable
>>> libpulse which uses vlc_tdestroy without linking the core.
>>> Vittorio
>>> 
>>> configure.ac                           | 2 ++
>>> modules/services_discovery/Makefile.am | 3 +++
>>> 2 files changed, 5 insertions(+)
>>> 
>>> diff --git a/configure.ac b/configure.ac
>>> index 2e6eb2b..9b8a0e9 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -808,6 +808,8 @@ dnl
>>> 
>>> dnl  POSIX
>>> AC_CHECK_HEADERS([arpa/inet.h pthread.h search.h sys/shm.h sys/socket.h
>>> sys/uio.h]) +AM_CONDITIONAL([HAVE_NOTDESTROY], [test "$have_search_h" =
>>> "yes" && test "$have_tdestroy" = "no"]) +
>>> AC_CHECK_HEADERS([net/if.h], [], [],
>>> [
>>> #include <sys/types.h>
>>> diff --git a/modules/services_discovery/Makefile.am
>>> b/modules/services_discovery/Makefile.am index 2bdc75f..41cdc02 100644
>>> --- a/modules/services_discovery/Makefile.am
>>> +++ b/modules/services_discovery/Makefile.am
>>> @@ -35,6 +35,9 @@ EXTRA_LTLIBRARIES += libupnp_plugin.la
>>> sd_LTLIBRARIES += $(LTLIBupnp)
>>> 
>>> libpulselist_plugin_la_SOURCES = services_discovery/pulse.c
>>> +if HAVE_NOTDESTROY
>>> +libpulselist_plugin_la_SOURCES += ../src/extras/tdestroy.c
>>> +endif
>>> libpulselist_plugin_la_CFLAGS = $(AM_CFLAGS) $(PULSE_CFLAGS)
>>> libpulselist_plugin_la_LIBADD = libvlc_pulse.la $(PULSE_LIBS)
>>> if HAVE_PULSE
>> 
>> This feels very wrong and in any case, it is not supported properly by
>> automake, so no.
>> 
>>
Hi,

I think the compat for that function is somehow broken. Its defined in vlc_fixups.h (with #define tdestroy vlc_tdestroy), but not really part of compat. OTOH, there is tdestroy.c in compat, which defines a replacement for destroy, but not vlc_tdestroy.
I do not know why there is yet another tdestroy replacement inside the core.  

Maybe switching to the compat replacement is the better way here?

> 
> Yeah it's pretty ugly.
> Would it be ok to disable pulse by default on OSX then?

I never tested pulse on macOS, so I would not mind. I see that macports has a pulse variant, but that seems for pulse audio output mainly.

Best,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20161002/bb786379/attachment.html>


More information about the vlc-devel mailing list