Workaround sd_bus_message_append_cmdline
Unable to get libmapper built without systemd being patched with the
sd_bus_message_append_cmdline function. Until it is pushed upstream,
this is a workaround to get the available systemd install built for unit
testing.
Change-Id: Ieca78955a4182eebd469a860c37ccaedfe75d323
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/libmapper/app.c b/libmapper/app.c
index f0d6b03..887d02f 100644
--- a/libmapper/app.c
+++ b/libmapper/app.c
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <systemd/sd-bus.h>
diff --git a/libmapper/workaround/systemd.h b/libmapper/workaround/systemd.h
new file mode 100644
index 0000000..1b32753
--- /dev/null
+++ b/libmapper/workaround/systemd.h
@@ -0,0 +1,6 @@
+#ifdef IS_UNPATCHED_SYSTEMD
+#include <systemd/sd-bus.h>
+
+int sd_bus_message_append_cmdline(sd_bus_message *m, const char *signature,
+ char ***x) { return 0; }
+#endif