From 5f86c1f4c43ee9caa120d130e9b89d3fd25124c0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 6 Dec 2014 02:39:15 +0100 Subject: sd-bus: rework ELF error mapping table magic The ELF magic cannot work for consumers of our shard library, since they are in a different module. Hence make all the ELF magic private, and instead introduce a public function to register additional static mapping table. --- src/timedate/timedated.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/timedate/timedated.c') diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 24de21008..08ddc52ca 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -38,14 +38,16 @@ #include "fileio-label.h" #include "label.h" #include "bus-util.h" +#include "bus-error.h" #include "bus-errors.h" #include "event-util.h" #define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n" #define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n" -SD_BUS_ERROR_MAPPING(timedated) = { - {"org.freedesktop.timedate1.NoNTPSupport", ENOTSUP}, +static BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map timedated_errors[] = { + SD_BUS_ERROR_MAP("org.freedesktop.timedate1.NoNTPSupport", ENOTSUP), + SD_BUS_ERROR_MAP_END }; typedef struct Context { -- cgit v1.2.3