From: Lennart Poettering Date: Tue, 25 Oct 2005 12:56:50 +0000 (+0000) Subject: build avahi_exe_name() exclusively on Linux X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=df8f2ac54e0786d1426da9ca9338590796938a6f;p=catta build avahi_exe_name() exclusively on Linux git-svn-id: file:///home/lennart/svn/public/avahi/trunk@865 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- diff --git a/avahi-compat-libdns_sd/warn.c b/avahi-compat-libdns_sd/warn.c index 486447d..0f7f6dc 100644 --- a/avahi-compat-libdns_sd/warn.c +++ b/avahi-compat-libdns_sd/warn.c @@ -46,6 +46,8 @@ static pthread_mutex_t linkage_mutex = PTHREAD_MUTEX_INITIALIZER; static int linkage_warning = 0; +#ifdef __linux__ + const char *avahi_exe_name(void) { static char exe_name[1024] = ""; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; @@ -79,6 +81,18 @@ const char *avahi_exe_name(void) { return exe_name; } +#else + +#ifdef __GNUC__ +#warning "avahi_exe_name() needs to be implemented for your operating system" +#endif + +const char *avahi_exe_name(void) { + return "(unknown)"; +} + +#endif + void avahi_warn(const char *fmt, ...) { char msg[512] = "*** WARNING *** "; va_list ap;