summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-07-05 10:16:54 +0200
committerThomas Haller <thaller@redhat.com>2020-07-06 14:11:22 +0200
commit19613016e23fc891fb4d993e5d75a919a3b8a179 (patch)
tree5ccdf67e1aa105336f897c82fd8b55ed0e2bf94b
parentb109d6337637e0dc23051a77252b8434f6a7d797 (diff)
downloadNetworkManager-19613016e23fc891fb4d993e5d75a919a3b8a179.tar.gz
shared: add "nm-std-aux/nm-std-utils.[hc]"
General purpose utilities for nm-std-aux. Contrary to "nm-std-aux.h", this is not header only.
-rw-r--r--Makefile.am2
-rw-r--r--shared/meson.build16
-rw-r--r--shared/nm-default.h1
-rw-r--r--shared/nm-std-aux/nm-std-utils.c6
-rw-r--r--shared/nm-std-aux/nm-std-utils.h6
5 files changed, 24 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index 43ae18772b..e6d55b0bc1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -357,6 +357,8 @@ shared_nm_std_aux_libnm_std_aux_la_SOURCES = \
shared/nm-std-aux/c-list-util.h \
shared/nm-std-aux/nm-dbus-compat.h \
shared/nm-std-aux/nm-std-aux.h \
+ shared/nm-std-aux/nm-std-utils.c \
+ shared/nm-std-aux/nm-std-utils.h \
shared/nm-std-aux/unaligned.h \
$(NULL)
diff --git a/shared/meson.build b/shared/meson.build
index 48880ec4f6..0f46a00cbb 100644
--- a/shared/meson.build
+++ b/shared/meson.build
@@ -113,15 +113,17 @@ nm_test_utils_impl_source = files('nm-test-utils-impl.c')
nm_vpn_plugin_utils_source = files('nm-utils/nm-vpn-plugin-utils.c')
-c_flags = [
- '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
- '-DNETWORKMANAGER_COMPILATION=0',
-]
-
libnm_std_aux = static_library(
'nm-std-aux',
- sources: 'nm-std-aux/c-list-util.c',
- c_args: c_flags,
+ sources: [
+ 'nm-std-aux/c-list-util.c',
+ 'nm-std-aux/nm-std-utils.c',
+ ],
+ include_directories: top_inc,
+ c_args: [
+ '-DG_LOG_DOMAIN="@0@"'.format(libnm_name),
+ '-DNETWORKMANAGER_COMPILATION=0',
+ ],
)
sources = files(
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 74a3c18332..447b4dbf73 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -262,6 +262,7 @@ _nm_g_return_if_fail_warning (const char *log_domain,
/*****************************************************************************/
#include "nm-std-aux/nm-std-aux.h"
+#include "nm-std-aux/nm-std-utils.h"
#include "nm-glib-aux/nm-macros-internal.h"
#include "nm-glib-aux/nm-shared-utils.h"
#include "nm-glib-aux/nm-errno.h"
diff --git a/shared/nm-std-aux/nm-std-utils.c b/shared/nm-std-aux/nm-std-utils.c
new file mode 100644
index 0000000000..8175ee2c56
--- /dev/null
+++ b/shared/nm-std-aux/nm-std-utils.c
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: LGPL-2.1+
+
+#include "nm-default.h"
+
+#include "nm-std-utils.h"
+
diff --git a/shared/nm-std-aux/nm-std-utils.h b/shared/nm-std-aux/nm-std-utils.h
new file mode 100644
index 0000000000..4afdde6468
--- /dev/null
+++ b/shared/nm-std-aux/nm-std-utils.h
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: LGPL-2.1+
+
+#ifndef __NM_STD_UTILS_H__
+#define __NM_STD_UTILS_H__
+
+#endif /* __NM_STD_UTILS_H__ */