From c5a592920fab217fdb3aaa897e68f5643de88dc4 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 16 May 2014 00:18:55 +0200 Subject: SBUS: Add several error constant definitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several error constants we use were added in later DBus versions. This patch conditionally #defines them. Reviewed-by: Stef Walter Reviewed-by: Pavel Březina --- src/sbus/sssd_dbus.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h index 9c236479e..4ae64f054 100644 --- a/src/sbus/sssd_dbus.h +++ b/src/sbus/sssd_dbus.h @@ -30,6 +30,26 @@ struct sbus_request; #include #include "util/util.h" +/* Older platforms (such as RHEL-6) might not have these error constants + * defined */ +#ifndef DBUS_ERROR_UNKNOWN_INTERFACE +/** Interface you invoked a method on isn't known by the object. */ +#define DBUS_ERROR_UNKNOWN_INTERFACE \ + "org.freedesktop.DBus.Error.UnknownInterface" +#endif /* DBUS_ERROR_UNKNOWN_INTERFACE */ + +#ifndef DBUS_ERROR_UNKNOWN_PROPERTY +/** Property you tried to access isn't known by the object. */ +#define DBUS_ERROR_UNKNOWN_PROPERTY \ + "org.freedesktop.DBus.Error.UnknownProperty" +#endif /* DBUS_ERROR_UNKNOWN_PROPERTY */ + +#ifndef DBUS_ERROR_PROPERTY_READ_ONLY +/** Property you tried to set is read-only. */ +#define DBUS_ERROR_PROPERTY_READ_ONLY \ + "org.freedesktop.DBus.Error.PropertyReadOnly" +#endif /* DBUS_ERROR_PROPERTY_READ_ONLY */ + typedef int (*sbus_msg_handler_fn)(struct sbus_request *dbus_req, void *instance_data); -- cgit