From bf3dfb28efab49d72e8ca161cc4dd7a24a2ffce5 Mon Sep 17 00:00:00 2001 From: Dmitry Fedorov Date: Sat, 30 May 2020 21:37:05 +0300 Subject: [PATCH] conditionally use qubesdb dependency in vchan-sink module --- pulse/Makefile | 2 +- pulse/module-vchan-sink.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pulse/Makefile b/pulse/Makefile index 26151341..f5100512 100644 --- a/pulse/Makefile +++ b/pulse/Makefile @@ -10,6 +10,6 @@ module-vchan-sink.so: module-vchan-sink.o $(CC) -shared -o module-vchan-sink.so module-vchan-sink.o \ $(VCHANLIBS) $(LIBS) module-vchan-sink.o: module-vchan-sink.c - $(CC) $(CFLAGS) -g -c $(VCHANCFLAGS) -fPIC module-vchan-sink.c -DHAVE_CONFIG_H -I. + $(CC) $(CFLAGS) -g -c $(VCHANCFLAGS) -fPIC module-vchan-sink.c -DHAVE_CONFIG_H -DHAVE_QUBESDB_CLIENT_H -I. clean: rm -f *.so *.o *~ diff --git a/pulse/module-vchan-sink.c b/pulse/module-vchan-sink.c index d4351eb8..f43ee59d 100644 --- a/pulse/module-vchan-sink.c +++ b/pulse/module-vchan-sink.c @@ -79,7 +79,9 @@ #include "module-vchan-sink-symdef.h" #include "qubes-vchan-sink.h" #include +#ifdef HAVE_QUBESDB_CLIENT_H #include +#endif PA_MODULE_AUTHOR("Marek Marczykowski-Górecki"); PA_MODULE_DESCRIPTION("VCHAN sink/source"); @@ -660,6 +662,7 @@ int pa__init(pa_module * m) pa_sink_new_data data_sink; pa_source_new_data data_source; int domid = DEFAULT_DOMID; +#ifdef HAVE_QUBESDB_CLIENT_H qdb_handle_t qdb; char *qdb_entry, *tmp; int qdb_domid; @@ -679,6 +682,7 @@ int pa__init(pa_module * m) free(qdb_entry); } qdb_close(qdb); +#endif pa_assert(m);