merge: fix build & tests with older tooling
This commit is contained in:
@@ -59,7 +59,7 @@ DISTCLEANFILES = intltool-extract intltool-merge intltool-update
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = NetworkManager.pc
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=error
|
||||
|
||||
CLEANFILES = cscope.in.out cscope.out cscope.po.out
|
||||
|
||||
|
@@ -28,5 +28,5 @@ AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
|
||||
|
||||
cd $olddir
|
||||
if test -z "$NOCONFIGURE"; then
|
||||
exec $srcdir/configure --enable-maintainer-mode "$@"
|
||||
exec $srcdir/configure --enable-maintainer-mode --enable-more-warnings=error "$@"
|
||||
fi
|
||||
|
13
configure.ac
13
configure.ac
@@ -364,12 +364,19 @@ AS_IF([test "$with_session_tracking" = "none"], [use_consolekit="no" use_systemd
|
||||
AS_IF([test -n "$with_systemd_logind" ], [use_systemd_logind="$with_systemd_logind"])
|
||||
AS_IF([test -n "$with_consolekit" ], [use_consolekit="$with_consolekit"])
|
||||
# defaults
|
||||
AS_IF([test -z "$use_systemd_logind"], [use_systemd_logind="yes"])
|
||||
AS_IF([test -z "$use_systemd_logind"], [use_systemd_logind="auto"])
|
||||
AS_IF([test -z "$use_consolekit"], [use_consolekit="yes"])
|
||||
# output
|
||||
session_tracking=
|
||||
if test "$use_systemd_logind" = "yes"; then
|
||||
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], , [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login])])
|
||||
if test "$use_systemd_logind" = "yes" -o "$use_systemd_logind" = "auto"; then
|
||||
PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd], [have_systemd_logind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login], [have_systemd_logind=yes], [have_systemd_logind=no])])
|
||||
else
|
||||
have_systemd_logind=no
|
||||
fi
|
||||
if test "$use_systemd_logind" = "yes" -a "$have_systemd_logind" = "no"; then
|
||||
AC_MSG_ERROR([You must have libsystemd installed to build with systemd-logind support.])
|
||||
fi
|
||||
if test "$have_systemd_logind" = "yes"; then
|
||||
AC_SUBST(SYSTEMD_LOGIN_CFLAGS)
|
||||
AC_SUBST(SYSTEMD_LOGIN_LIBS)
|
||||
AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available])
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <gio/gio.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
#include "nm-core-internal.h"
|
||||
|
||||
typedef struct {
|
||||
|
@@ -91,7 +91,7 @@ _nm_gtype_hash (gconstpointer v)
|
||||
return *((const GType *) v);
|
||||
}
|
||||
|
||||
static void __attribute__((constructor))
|
||||
static void
|
||||
_ensure_registered (void)
|
||||
{
|
||||
if (G_UNLIKELY (registered_settings == NULL)) {
|
||||
@@ -103,6 +103,12 @@ _ensure_registered (void)
|
||||
}
|
||||
}
|
||||
|
||||
static void __attribute__((constructor))
|
||||
_ensure_registered_constructor (void)
|
||||
{
|
||||
_ensure_registered ();
|
||||
}
|
||||
|
||||
#define _ensure_setting_info(self, priv) \
|
||||
G_STMT_START { \
|
||||
NMSettingPrivate *_priv_esi = (priv); \
|
||||
|
@@ -99,7 +99,7 @@ _nm_gtype_hash (gconstpointer v)
|
||||
return *((const GType *) v);
|
||||
}
|
||||
|
||||
static void __attribute__((constructor))
|
||||
static void
|
||||
_ensure_registered (void)
|
||||
{
|
||||
if (G_UNLIKELY (registered_settings == NULL)) {
|
||||
@@ -112,6 +112,12 @@ _ensure_registered (void)
|
||||
}
|
||||
}
|
||||
|
||||
static void __attribute__((constructor))
|
||||
_ensure_registered_constructor (void)
|
||||
{
|
||||
_ensure_registered ();
|
||||
}
|
||||
|
||||
#define _ensure_setting_info(self, priv) \
|
||||
G_STMT_START { \
|
||||
NMSettingPrivate *_priv_esi = (priv); \
|
||||
|
@@ -22,7 +22,7 @@ AC_DEFUN([NM_COMPILER_WARNING], [
|
||||
AC_DEFUN([NM_COMPILER_WARNINGS],
|
||||
[AC_ARG_ENABLE(more-warnings,
|
||||
AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
|
||||
set_more_warnings="$enableval",set_more_warnings=error)
|
||||
set_more_warnings="$enableval",set_more_warnings=yes)
|
||||
AC_MSG_CHECKING(for more warnings)
|
||||
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
@@ -34,6 +34,8 @@
|
||||
#include <glib-unix.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "gsystem-local-alloc.h"
|
||||
#include "main-utils.h"
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
@@ -26,6 +26,8 @@
|
||||
#include <libsoup/soup.h>
|
||||
#endif
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "nm-connectivity.h"
|
||||
#include "nm-config.h"
|
||||
#include "nm-logging.h"
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#ifndef aligned_u64
|
||||
#define aligned_u64 unsigned long long __attribute__((aligned(8)))
|
||||
#endif
|
||||
#include <linux/if.h>
|
||||
#include <linux/if_ppp.h>
|
||||
|
||||
#include "NetworkManagerUtils.h"
|
||||
|
@@ -27,6 +27,8 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "nm-logging.h"
|
||||
#include "writer.h"
|
||||
#include "common.h"
|
||||
|
@@ -25,6 +25,8 @@
|
||||
#include <glib.h>
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
#include "nm-glib-compat.h"
|
||||
|
||||
#include "nm-supplicant-manager.h"
|
||||
#include "nm-supplicant-interface.h"
|
||||
#include "nm-logging.h"
|
||||
|
@@ -41,6 +41,11 @@
|
||||
|
||||
#include "nm-logging.h"
|
||||
|
||||
/* Missing in Linux 3.2.0, in Ubuntu 12.04 */
|
||||
#ifndef BPF_XOR
|
||||
#define BPF_XOR 0xa0
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline NMLogLevel
|
||||
|
@@ -1148,7 +1148,7 @@ def main():
|
||||
sys.exit(1)
|
||||
|
||||
# Watch stdin; if it closes, assume our parent has crashed, and exit
|
||||
io = GLib.IOChannel.unix_new(0)
|
||||
io = GLib.IOChannel(0)
|
||||
io.add_watch(GLib.IOCondition.HUP, stdin_cb)
|
||||
|
||||
# also quit after inactivity to ensure we don't stick around if the above fails somehow
|
||||
|
Reference in New Issue
Block a user