mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 10:46:59 +00:00
all: add "nm-default-systemd{,-shared}.h" as replacement for "nm-default.h"
This commit is contained in:
parent
dc2afc9b77
commit
66eccf7ad7
|
@ -1960,7 +1960,6 @@ noinst_LTLIBRARIES += shared/systemd/libnm-systemd-logging-stub.la
|
|||
|
||||
shared_systemd_libnm_systemd_logging_stub_la_CPPFLAGS = \
|
||||
$(libsystemd_cppflags) \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED \
|
||||
-DG_LOG_DOMAIN=\""libnm"\" \
|
||||
$(NULL)
|
||||
|
||||
|
@ -1977,11 +1976,11 @@ noinst_LTLIBRARIES += shared/systemd/libnm-systemd-shared.la
|
|||
|
||||
shared_systemd_libnm_systemd_shared_la_CPPFLAGS = \
|
||||
$(libsystemd_cppflags) \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED \
|
||||
-DG_LOG_DOMAIN=\""libnm"\" \
|
||||
$(NULL)
|
||||
|
||||
shared_systemd_libnm_systemd_shared_la_SOURCES = \
|
||||
shared/systemd/nm-default-systemd-shared.h \
|
||||
shared/systemd/nm-sd-utils-shared.c \
|
||||
shared/systemd/nm-sd-utils-shared.h \
|
||||
shared/systemd/sd-adapt-shared/architecture.h \
|
||||
|
@ -2126,7 +2125,7 @@ src_core_libnm_systemd_core_la_cppflags = \
|
|||
-I$(srcdir)/src/core/systemd/src/systemd \
|
||||
-I$(srcdir)/src/core/systemd/src/libsystemd-network \
|
||||
-I$(srcdir)/src/core/systemd/src/libsystemd/sd-event \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD \
|
||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||
$(NULL)
|
||||
|
||||
src_core_libnm_systemd_core_la_libadd = \
|
||||
|
@ -2135,6 +2134,7 @@ src_core_libnm_systemd_core_la_libadd = \
|
|||
$(NULL)
|
||||
|
||||
src_core_libnm_systemd_core_la_SOURCES = \
|
||||
src/core/systemd/nm-default-systemd.h \
|
||||
src/core/systemd/nm-sd-utils-core.c \
|
||||
src/core/systemd/nm-sd-utils-core.h \
|
||||
src/core/systemd/nm-sd.c \
|
||||
|
@ -4318,7 +4318,6 @@ $(src_core_tests_test_wired_defname_OBJECTS): $(libnm_core_lib_h_pub_mkenums)
|
|||
|
||||
src_core_tests_test_systemd_CPPFLAGS = \
|
||||
$(src_core_libnm_systemd_core_la_cppflags) \
|
||||
-DNETWORKMANAGER_COMPILATION_TEST \
|
||||
$(NULL)
|
||||
|
||||
src_core_tests_test_systemd_LDFLAGS = \
|
||||
|
|
|
@ -278,7 +278,6 @@ libnm_systemd_shared = static_library(
|
|||
dependencies: glib_nm_default_dep,
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="libnm"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -298,7 +297,6 @@ libnm_systemd_logging_stub = static_library(
|
|||
dependencies: glib_nm_default_dep,
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="libnm"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED',
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -22,9 +22,7 @@
|
|||
#error Define NETWORKMANAGER_COMPILATION accordingly
|
||||
#endif
|
||||
|
||||
#if NETWORKMANAGER_COMPILATION < NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED
|
||||
#error Dont include this header with such NETWORKMANAGER_COMPILATION
|
||||
#endif
|
||||
#error We don't expect this header to be used anymore.
|
||||
|
||||
#ifndef G_LOG_DOMAIN
|
||||
#if defined(NETWORKMANAGER_COMPILATION_TEST)
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#define NM_TEST_UTILS_NO_LIBNM 1
|
||||
|
||||
#include "nm-glib-aux/nm-default-glib-i18n-prog.h"
|
||||
|
||||
#include <jansson.h>
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* Copyright (C) 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#define NM_TEST_UTILS_NO_LIBNM 1
|
||||
|
||||
#include "nm-glib-aux/nm-default-glib-i18n-prog.h"
|
||||
|
||||
#include "nm-std-aux/unaligned.h"
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#define NM_TEST_UTILS_NO_LIBNM 1
|
||||
|
||||
#include "nm-glib-aux/nm-default-glib-i18n-prog.h"
|
||||
|
||||
#include "nm-log-core/nm-logging.h"
|
||||
|
|
|
@ -92,10 +92,6 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef NM_TEST_UTILS_NO_LIBNM
|
||||
#include "nm-utils.h"
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define NMTST_G_RETURN_MSG_S(expr) "*: assertion '" NM_ASSERT_G_RETURN_EXPR(expr) "' failed"
|
||||
|
|
18
shared/systemd/nm-default-systemd-shared.h
Normal file
18
shared/systemd/nm-default-systemd-shared.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NM_DEFAULT_SYSTEMD_SHARED_H__
|
||||
#define __NM_DEFAULT_SYSTEMD_SHARED_H__
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "nm-glib-aux/nm-default-glib.h"
|
||||
|
||||
#undef NETWORKMANAGER_COMPILATION
|
||||
#define NETWORKMANAGER_COMPILATION NM_NETWORKMANAGER_COMPILATION_SYSTEMD_SHARED
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NM_DEFAULT_SYSTEMD_SHARED_H__ */
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "shared/systemd/nm-default-systemd-shared.h"
|
||||
|
||||
#include "nm-glib-aux/nm-logging-fwd.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "shared/systemd/nm-default-systemd-shared.h"
|
||||
|
||||
#include "nm-sd-utils-shared.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef __NM_SD_ADAPT_SHARED_H__
|
||||
#define __NM_SD_ADAPT_SHARED_H__
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "shared/systemd/nm-default-systemd-shared.h"
|
||||
|
||||
#include "nm-glib-aux/nm-logging-fwd.h"
|
||||
|
||||
|
|
|
@ -45,7 +45,9 @@ libnm_systemd_core = static_library(
|
|||
libnm_core_dep,
|
||||
libnm_systemd_shared_dep,
|
||||
],
|
||||
c_args: '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="NetworkManager"',
|
||||
],
|
||||
link_with: libc_siphash,
|
||||
)
|
||||
|
||||
|
|
18
src/core/systemd/nm-default-systemd.h
Normal file
18
src/core/systemd/nm-default-systemd.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NM_DEFAULT_SYSTEMD_H__
|
||||
#define __NM_DEFAULT_SYSTEMD_H__
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "nm-default-daemon.h"
|
||||
|
||||
#undef NETWORKMANAGER_COMPILATION
|
||||
#define NETWORKMANAGER_COMPILATION NM_NETWORKMANAGER_COMPILATION_SYSTEMD
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NM_DEFAULT_SYSTEMD_H__ */
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2018 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "src/core/systemd/nm-default-systemd.h"
|
||||
|
||||
#include "nm-sd-utils-core.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2019 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "src/core/systemd/nm-default-systemd.h"
|
||||
|
||||
#include "nm-sd-utils-dhcp.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2014 - 2016 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "src/core/systemd/nm-default-systemd.h"
|
||||
|
||||
#include "nm-sd.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2014 - 2016 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "src/core/systemd/nm-default-systemd.h"
|
||||
|
||||
#include "nm-sd-adapt-core.h"
|
||||
|
||||
|
|
|
@ -6,13 +6,16 @@
|
|||
#ifndef __NM_SD_ADAPT_CORE_H__
|
||||
#define __NM_SD_ADAPT_CORE_H__
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "src/core/systemd/nm-default-systemd.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <sys/resource.h>
|
||||
#include <time.h>
|
||||
|
||||
#undef NETWORKMANAGER_COMPILATION
|
||||
#include "systemd/sd-adapt-shared/nm-sd-adapt-shared.h"
|
||||
#undef NETWORKMANAGER_COMPILATION
|
||||
#define NETWORKMANAGER_COMPILATION NM_NETWORKMANAGER_COMPILATION_SYSTEMD
|
||||
|
||||
#ifndef HAVE_SYS_AUXV_H
|
||||
#define HAVE_SYS_AUXV_H 0
|
||||
|
|
|
@ -41,8 +41,7 @@ exe = executable(
|
|||
libnm_systemd_shared_dep,
|
||||
],
|
||||
c_args: [
|
||||
'-DNETWORKMANAGER_COMPILATION_TEST',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
||||
'-DG_LOG_DOMAIN="test"',
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2016 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "src/core/systemd/nm-default-systemd.h"
|
||||
|
||||
#include "systemd/nm-sd.h"
|
||||
#include "systemd/nm-sd-utils-shared.h"
|
||||
|
|
Loading…
Reference in a new issue