Bug report
MdnsBrowser not declared compilation error in CLI tools when ENABLE_MDNS is false
Steps to reproduce
- Configure cmake without MDNS support (e.g. missing dependencies, causing
ENABLE_MDNS=OFF)
- Run
make
- Compile fails at
hyperion-remote.cpp (and all subsequent CLI tools) at the MdnsBrowser::isMdns check.
What is expected?
The if (MdnsBrowser::isMdns(hostName)) block should be guarded by #ifdef ENABLE_MDNS, matching the #include guards at the top of the files. The codebase should compile successfully even when ENABLE_MDNS is false.
What is actually happening?
The build fails with an error: 'MdnsBrowser' has not been declared.
This occurs because MdnsBrowser::isMdns(hostName) is called directly without being wrapped in an #ifdef ENABLE_MDNS block, even though the header #include <mdns/MdnsBrowser.h> is properly #ifdef guarded at the top of the files.
Files affected:
src/hyperion-remote/hyperion-remote.cpp
src/hyperion-drm/hyperion-drm.cpp
src/hyperion-framebuffer/hyperion-framebuffer.cpp
src/hyperion-v4l2/hyperion-v4l2.cpp
src/hyperion-x11/hyperion-x11.cpp
src/hyperion-xcb/hyperion-xcb.cpp
src/hyperion-aml/hyperion-aml.cpp
src/hyperion-dispmanx/hyperion-dispmanx.cpp
src/hyperion-osx/hyperion-osx.cpp
src/hyperion-qt/hyperion-qt.cpp
Proposed fix:
Wrap the block in all 10 files like so:
#ifdef ENABLE_MDNS
if (MdnsBrowser::isMdns(hostName)) {
NetUtils::discoverMdnsServices("...");
}
#endif
System
Bug report
MdnsBrowsernot declared compilation error in CLI tools whenENABLE_MDNSis falseSteps to reproduce
ENABLE_MDNS=OFF)makehyperion-remote.cpp(and all subsequent CLI tools) at theMdnsBrowser::isMdnscheck.What is expected?
The
if (MdnsBrowser::isMdns(hostName))block should be guarded by#ifdef ENABLE_MDNS, matching the#includeguards at the top of the files. The codebase should compile successfully even whenENABLE_MDNSis false.What is actually happening?
The build fails with an error:
'MdnsBrowser' has not been declared.This occurs because
MdnsBrowser::isMdns(hostName)is called directly without being wrapped in an#ifdef ENABLE_MDNSblock, even though the header#include <mdns/MdnsBrowser.h>is properly#ifdefguarded at the top of the files.Files affected:
src/hyperion-remote/hyperion-remote.cppsrc/hyperion-drm/hyperion-drm.cppsrc/hyperion-framebuffer/hyperion-framebuffer.cppsrc/hyperion-v4l2/hyperion-v4l2.cppsrc/hyperion-x11/hyperion-x11.cppsrc/hyperion-xcb/hyperion-xcb.cppsrc/hyperion-aml/hyperion-aml.cppsrc/hyperion-dispmanx/hyperion-dispmanx.cppsrc/hyperion-osx/hyperion-osx.cppsrc/hyperion-qt/hyperion-qt.cppProposed fix:
Wrap the block in all 10 files like so:
System