]> git.meshlink.io Git - catta/commitdiff
build avahi_exe_name() exclusively on Linux
authorLennart Poettering <lennart@poettering.net>
Tue, 25 Oct 2005 12:56:50 +0000 (12:56 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 25 Oct 2005 12:56:50 +0000 (12:56 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@865 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-compat-libdns_sd/warn.c

index 486447df2554435337de6b163c419066f7181587..0f7f6dc647eeb6c32db710385c10f7e66a96f7b6 100644 (file)
@@ -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;