[prev in list] [next in list] [prev in thread] [next in thread] 

List:       collectd
Subject:    [collectd] patch for libnotify-0.7
From:       "Andreas K. Huettel" <dilfridge () gentoo ! org>
Date:       2011-02-07 22:26:32
Message-ID: 201102072326.33080.dilfridge () gentoo ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi, 

here's a small patch that we need and use in Gentoo to support compiling 
against libnotify-0.7. 

Please consider integrating it into the code...

Thanks a lot in advance, best, Andreas


-- 

Andreas K. Huettel
Gentoo Linux developer 
dilfridge@gentoo.org
http://www.akhuettel.de/


["collectd-4.10.2-libnotify-0.7.patch" (text/x-patch)]

--- src/notify_desktop.c
+++ src/notify_desktop.c
@@ -31,6 +31,10 @@
 #include <glib.h>
 #include <libnotify/notify.h>
 
+#ifndef NOTIFY_CHECK_VERSION
+#define NOTIFY_CHECK_VERSION(x,y,z) 0
+#endif
+
 #define log_info(...) INFO ("notify_desktop: " __VA_ARGS__)
 #define log_warn(...) WARNING ("notify_desktop: " __VA_ARGS__)
 #define log_err(...) ERROR ("notify_desktop: " __VA_ARGS__)
@@ -95,7 +99,12 @@
 				: (NOTIF_WARNING == n->severity) ? "WARNING"
 				: (NOTIF_OKAY == n->severity) ? "OKAY" : "UNKNOWN");
 
-	notification = notify_notification_new (summary, n->message, NULL, NULL);
+	notification = notify_notification_new (summary, n->message, NULL
+#if NOTIFY_CHECK_VERSION (0, 7, 0)
+	);
+#else
+	, NULL);
+#endif
 	if (NULL == notification) {
 		log_err ("Failed to create a new notification.");
 		return -1;

["signature.asc" (application/pgp-signature)]

_______________________________________________
collectd mailing list
collectd@verplant.org
http://mailman.verplant.org/listinfo/collectd


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic