From a1ff911a0804f2bfa725237616b80dceca9c749b Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 15 Aug 2023 14:43:37 +0200 Subject: [PATCH] add missing stuff to remove mongodb --- lib/dbi/meson_dummy.h | 34 ++++++++++++++++++++++++++++++++++ lib/dbi/path.c | 4 ++++ lib/dbi/path.h | 2 ++ src/meson.build | 4 +++- 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 lib/dbi/meson_dummy.h diff --git a/lib/dbi/meson_dummy.h b/lib/dbi/meson_dummy.h new file mode 100644 index 000000000..09be9358e --- /dev/null +++ b/lib/dbi/meson_dummy.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2019-2022 by Sukchan Lee + * + * This file is part of Open5GS. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef MESON_DUMMY_H +#define MESON_DUMMY_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct dummy_bson; +typedef struct dummy_bson bson_t; + +#ifdef __cplusplus +} +#endif + +#endif /* MESON_DUMMY_H */ diff --git a/lib/dbi/path.c b/lib/dbi/path.c index 3d223f44a..9dc10ecb7 100644 --- a/lib/dbi/path.c +++ b/lib/dbi/path.c @@ -19,6 +19,8 @@ #include "ogs-dbi.h" +#ifdef OGS_DBI_WITH_MONGODB + int ogs_dbi_process_change_stream(const bson_t *document) { int rv; @@ -39,3 +41,5 @@ int ogs_dbi_process_change_stream(const bson_t *document) return OGS_OK; } + +#endif diff --git a/lib/dbi/path.h b/lib/dbi/path.h index e6486d5e7..338fbe3af 100644 --- a/lib/dbi/path.h +++ b/lib/dbi/path.h @@ -20,6 +20,8 @@ #ifndef OGS_DBI_PATH_H #define OGS_DBI_PATH_H +#include "meson_dummy.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/src/meson.build b/src/meson.build index d313b6932..f3fa336e9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -34,7 +34,9 @@ version_conf.set_quoted('OPEN5GS_VERSION', package_version) configure_file(output : 'version.h', configuration : version_conf) subdir('mme') -subdir('hss') +if get_option('mongodb') + subdir('hss') +endif subdir('sgwc') subdir('sgwu') subdir('pcrf')