forked from pool/collectd
19 lines
654 B
Diff
19 lines
654 B
Diff
|
diff --git a/src/notify_desktop.c b/src/notify_desktop.c
|
||
|
index 839bc61..31c2411 100644
|
||
|
--- a/src/notify_desktop.c
|
||
|
+++ b/src/notify_desktop.c
|
||
|
@@ -95,7 +95,13 @@ static int c_notify (const notification_t *n,
|
||
|
: (NOTIF_WARNING == n->severity) ? "WARNING"
|
||
|
: (NOTIF_OKAY == n->severity) ? "OKAY" : "UNKNOWN");
|
||
|
|
||
|
+#if (defined NOTIFY_CHECK_VERSION)
|
||
|
+#if NOTIFY_CHECK_VERSION(0, 7, 0)
|
||
|
+ notification = notify_notification_new (summary, n->message, NULL);
|
||
|
+#endif
|
||
|
+#else
|
||
|
notification = notify_notification_new (summary, n->message, NULL, NULL);
|
||
|
+#endif
|
||
|
if (NULL == notification) {
|
||
|
log_err ("Failed to create a new notification.");
|
||
|
return -1;
|