diff --git a/CMakeLists.txt b/CMakeLists.txt index 179b672..9d9c894 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,8 @@ project(uxplay) set (CMAKE_CXX_STANDARD 11) +add_definitions(-DAVAHI_COMPAT_NOWARN) + find_package(X11 REQUIRED) link_libraries(${X11_LIBRARIES}) include_directories(${X11_INCLUDE_DIR}) diff --git a/uxplay.cpp b/uxplay.cpp index 9d97c2a..340aae3 100755 --- a/uxplay.cpp +++ b/uxplay.cpp @@ -106,6 +106,12 @@ int main(int argc, char *argv[]) { bool use_audio = true; bool debug_log = DEFAULT_DEBUG_LOG; +#ifdef AVAHI_COMPAT_NOWARN + //suppress avahi_compat nag message + char avahi_compat_nowarn[] = "AVAHI_COMPAT_NOWARN==1"; + putenv(avahi_compat_nowarn); +#endif + // Parse arguments for (int i = 1; i < argc; i++) { std::string arg(argv[i]);