mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
safer fix for avahi_compat startup warning
This commit is contained in:
@@ -13,7 +13,11 @@ include_directories(${X11_INCLUDE_DIR})
|
|||||||
# link_directories(${X11_LIBRARIES})
|
# link_directories(${X11_LIBRARIES})
|
||||||
endif (ZOOMFIX)
|
endif (ZOOMFIX)
|
||||||
|
|
||||||
add_definitions(-DAVAHI_COMPAT_NOWARN)
|
|
||||||
|
if (NO_AVAHI_FIX)
|
||||||
|
else()
|
||||||
|
add_definitions(-DSUPPRESS_AVAHI_COMPAT_WARNING)
|
||||||
|
endif(NO_AVAHI_FIX)
|
||||||
|
|
||||||
add_subdirectory(lib/llhttp)
|
add_subdirectory(lib/llhttp)
|
||||||
add_subdirectory(lib/playfair)
|
add_subdirectory(lib/playfair)
|
||||||
|
|||||||
@@ -154,6 +154,8 @@ name "uxplay" (note the difference in capitalization).
|
|||||||
|
|
||||||
9. The avahi_compat "nag" warning on startup is suppressed, by placing
|
9. The avahi_compat "nag" warning on startup is suppressed, by placing
|
||||||
"AVAHI_COMPAT_NOWARN=1" into the runtime environment when uxplay starts.
|
"AVAHI_COMPAT_NOWARN=1" into the runtime environment when uxplay starts.
|
||||||
|
(This uses a call to putenv(), If for any reason you dont want this fix,
|
||||||
|
run cmake as "cmake -DNO_AVAHI_FIX=ON -DZOOMFIX=ON .. ").
|
||||||
|
|
||||||
# Disclaimer
|
# Disclaimer
|
||||||
|
|
||||||
|
|||||||
@@ -196,10 +196,11 @@ int main (int argc, char *argv[]) {
|
|||||||
unsigned short display_size[2] = {0}, tcp[2] = {0}, udp[3] = {0};
|
unsigned short display_size[2] = {0}, tcp[2] = {0}, udp[3] = {0};
|
||||||
videoflip_t videoflip[2] = { NONE , NONE };
|
videoflip_t videoflip[2] = { NONE , NONE };
|
||||||
|
|
||||||
#ifdef AVAHI_COMPAT_NOWARN
|
#ifdef SUPPRESS_AVAHI_COMPAT_WARNING
|
||||||
//suppress avahi_compat nag message
|
// suppress avahi_compat nag message. avahi emits a "nag" warning (once)
|
||||||
char avahi_compat_nowarn[] = "AVAHI_COMPAT_NOWARN==1";
|
// if getenv("AVAHI_COMPAT_NOWARN") returns null.
|
||||||
putenv(avahi_compat_nowarn);
|
static char avahi_compat_nowarn[] = "AVAHI_COMPAT_NOWARN=1";
|
||||||
|
if (!getenv("AVAHI_COMPAT_NOWARN")) putenv(avahi_compat_nowarn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Parse arguments
|
// Parse arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user