RESOLVED FIXED 184711
[GTK][WPE] Build failure due to presence of Avahi's <dns_sd.h> header
https://bugs.webkit.org/show_bug.cgi?id=184711
Summary [GTK][WPE] Build failure due to presence of Avahi's <dns_sd.h> header
Adrian Perez
Reported 2018-04-17 15:15:05 PDT
The build failure is: […]/NetworkMDNSRegister.cpp:106:53: error: use of undeclared identifier 'dispatch_get_main_queue' error = DNSServiceSetDispatchQueue(service, dispatch_get_main_queue()); ^ Indeed, on GNU/Linux systems we do not have libdispatch! After a bit of investigation, I have found the following snippet inside “Source/WebKit/webrtc/NetworkProcess/NetworkMDNSRegister.h”: #if defined __has_include && __has_include(<dns_sd.h>) #define ENABLE_MDNS 1 #else #define ENABLE_MDNS 0 #endif It turns our that in systems with Avahi installed, it may optionally supply a <dns_sd.h> header which provides a certain degree of compatibility with Apple's libdns_sd but it is lacks functionality needed by WebKit (see https://github.com/lathiat/avahi/tree/master/avahi-compat-libdns_sd). We should detect when Avahi's version is installed, and if that is the case set ENABLE_MDNS to 0.
Attachments
Patch (1.35 KB, patch)
2018-04-17 15:34 PDT, Adrian Perez
no flags
youenn fablet
Comment 1 2018-04-17 15:18:10 PDT
Oh I see, maybe the short term fix would be to add a PLATFORM(COCOA) check?
Adrian Perez
Comment 2 2018-04-17 15:29:53 PDT
(In reply to youenn fablet from comment #1) > Oh I see, maybe the short term fix would be to add a PLATFORM(COCOA) check? Yes, exactly my plan. Later on down the line we may want to implement MDNS support using Avahi's full API instead of its libdns_sd compatibility API.
Adrian Perez
Comment 3 2018-04-17 15:34:35 PDT
Adrian Perez
Comment 4 2018-04-17 15:42:23 PDT
Filed bug #184713 to track implementing the functionality using Avahi, this one is only for the build failure fix.
WebKit Commit Bot
Comment 5 2018-04-17 16:41:14 PDT
Comment on attachment 338154 [details] Patch Clearing flags on attachment: 338154 Committed r230739: <https://trac.webkit.org/changeset/230739>
WebKit Commit Bot
Comment 6 2018-04-17 16:41:16 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-04-17 16:42:25 PDT
Note You need to log in before you can comment on or make changes to this bug.