[PATCH 2/4] build: only define WITH_SYSTEMD_JOURNAL if enabled

Colin Helliwell colin.helliwell at ln-systems.com
Thu Jun 22 13:56:22 UTC 2017


I think this is broken (along the lines of Ben's #if/#ifdef question).
Configuring with --with-systemd-journal results in
  #define WITH_SYSTEMD_JOURNAL 0
in config.h, but the code (e.g. mm-log.c) is using a '#if defined' ?

> On 22 June 2017 at 09:59 Aleksander Morgado <aleksander at aleksander.es> wrote:
> 
> ---
>  configure.ac | 7 ++-----
>  src/mm-context.c | 2 +-
>  2 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index c07a6be1..44730dc3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -260,17 +260,14 @@ if test "x$with_systemd_journal" = "xauto"; then
>  fi
> 
> case $with_systemd_journal in
> 
> *   no)
> *   AC_DEFINE(WITH_SYSTEMD_JOURNAL, 0, [Define if you want systemd
> journal support])
> *   ;;
> yes)
> if test "x$have_libsystemd" = "xno"; then
>  AC_MSG_ERROR(libsystemd development headers are required)
> *   fi
> 
> *   fi
> AC_DEFINE(WITH_SYSTEMD_JOURNAL, 1, [Define if you want systemd
> journal support])
> ;;
> *)
> 
> *   AC_MSG_ERROR([Wrong value for --with-systemd-journal:
> $with_systemd_journal])
> 
> *   with_systemd_journal=no
> ;;
> esac
> 
> diff --git a/src/mm-context.c b/src/mm-context.c
> index 6b0dab79..370fe28c 100644
> --- a/src/mm-context.c
> +++ b/src/mm-context.c
> @@ -104,7 +104,7 @@ static const GOptionEntry log_entries[] = {
>  "Path to log file",
>  "[PATH]"
>  },
> -#if WITH_SYSTEMD_JOURNAL
> +#if defined WITH_SYSTEMD_JOURNAL
>  {
>  "log-journal", 0, 0, G_OPTION_ARG_NONE, &log_journal,
> 
> "Log to systemd journal",
> --
> 2.13.1
> 
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


More information about the ModemManager-devel mailing list