all: add "nm-glib-aux/nm-default-glib.h" as replacement for "nm-default.h"
This commit is contained in:
@@ -398,6 +398,7 @@ shared_nm_glib_aux_libnm_glib_aux_la_SOURCES = \
|
||||
shared/nm-glib-aux/nm-dbus-aux.h \
|
||||
shared/nm-glib-aux/nm-dedup-multi.c \
|
||||
shared/nm-glib-aux/nm-dedup-multi.h \
|
||||
shared/nm-glib-aux/nm-default-glib.h \
|
||||
shared/nm-glib-aux/nm-enum-utils.c \
|
||||
shared/nm-glib-aux/nm-enum-utils.h \
|
||||
shared/nm-glib-aux/nm-errno.c \
|
||||
@@ -2986,7 +2987,6 @@ src_core_dhcp_nm_dhcp_helper_CPPFLAGS = \
|
||||
-I$(srcdir)/shared \
|
||||
-I$(builddir)/shared \
|
||||
-DG_LOG_DOMAIN=\""nm-dhcp-helper"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
@@ -3049,7 +3049,6 @@ src_core_ppp_nm_pppd_plugin_la_CPPFLAGS = \
|
||||
-I$(builddir)/shared \
|
||||
-I$(srcdir)/libnm-core \
|
||||
-DG_LOG_DOMAIN=\""nm-pppd-plugin"\" \
|
||||
-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
src_core_ppp_nm_pppd_plugin_la_SOURCES = \
|
||||
|
@@ -22,7 +22,8 @@
|
||||
#error Define NETWORKMANAGER_COMPILATION accordingly
|
||||
#endif
|
||||
|
||||
#if NETWORKMANAGER_COMPILATION < NM_NETWORKMANAGER_COMPILATION_WITH_GLIB
|
||||
#if NETWORKMANAGER_COMPILATION \
|
||||
< (NM_NETWORKMANAGER_COMPILATION_GLIB | NM_NETWORKMANAGER_COMPILATION_WITH_GLIB_I18N_LIB)
|
||||
#error Dont include this header with such NETWORKMANAGER_COMPILATION
|
||||
#endif
|
||||
|
||||
|
42
shared/nm-glib-aux/nm-default-glib.h
Normal file
42
shared/nm-glib-aux/nm-default-glib.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2015 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NM_DEFAULT_GLIB_H__
|
||||
#define __NM_DEFAULT_GLIB_H__
|
||||
|
||||
#include "nm-std-aux/nm-default-std.h"
|
||||
|
||||
#undef NETWORKMANAGER_COMPILATION
|
||||
#define NETWORKMANAGER_COMPILATION NM_NETWORKMANAGER_COMPILATION_WITH_GLIB
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#if defined(_NETWORKMANAGER_COMPILATION_GLIB_I18N_PROG)
|
||||
#if defined(_NETWORKMANAGER_COMPILATION_GLIB_I18N_LIB)
|
||||
#error Cannot define _NETWORKMANAGER_COMPILATION_GLIB_I18N_LIB and _NETWORKMANAGER_COMPILATION_GLIB_I18N_PROG together
|
||||
#endif
|
||||
#undef _NETWORKMANAGER_COMPILATION_GLIB_I18N_PROG
|
||||
#include <glib/gi18n.h>
|
||||
#elif defined(_NETWORKMANAGER_COMPILATION_GLIB_I18N_LIB)
|
||||
#undef _NETWORKMANAGER_COMPILATION_GLIB_I18N_LIB
|
||||
#include <glib/gi18n-lib.h>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "nm-gassert-patch.h"
|
||||
|
||||
#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"
|
||||
#include "nm-glib-aux/nm-hash-utils.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NM_DEFAULT_GLIB_H__ */
|
@@ -1,17 +1,12 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
name = 'nm-dhcp-helper'
|
||||
|
||||
c_flags = [
|
||||
'-DG_LOG_DOMAIN="@0@"'.format(name),
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB',
|
||||
]
|
||||
|
||||
executable(
|
||||
name,
|
||||
name + '.c',
|
||||
'nm-dhcp-helper',
|
||||
'nm-dhcp-helper.c',
|
||||
dependencies: glib_nm_default_dep,
|
||||
c_args: c_flags,
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nm-dhcp-helper"',
|
||||
],
|
||||
link_args: ldflags_linker_script_binary,
|
||||
link_depends: linker_script_binary,
|
||||
install: true,
|
||||
|
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007 - 2013 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "nm-glib-aux/nm-default-glib.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -7,7 +7,6 @@ nm_pppd_plugin = shared_module(
|
||||
dependencies: libnm_core_nm_default_dep,
|
||||
c_args: [
|
||||
'-DG_LOG_DOMAIN="nm-pppd-plugin"',
|
||||
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_GLIB',
|
||||
],
|
||||
install: true,
|
||||
install_dir: pppd_plugin_dir,
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#include <pppd/eui64.h>
|
||||
#include <pppd/ipv6cp.h>
|
||||
|
||||
#include "nm-default.h"
|
||||
#include "nm-glib-aux/nm-default-glib.h"
|
||||
|
||||
#include "nm-dbus-interface.h"
|
||||
|
||||
|
Reference in New Issue
Block a user