summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-06-02 12:30:51 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-06-02 12:31:08 +0200
commit83a82b44899b1ae65a1d25368bd16b559a8f480f (patch)
treeb0436c981065d176096a2980a113b3e2930819b5
parent36f7669a4c7799de4bbff4965437df829040a07e (diff)
parent84021454eb0b126fda9cf29c46b7860f75c7ff8c (diff)
downloadNetworkManager-83a82b44899b1ae65a1d25368bd16b559a8f480f.tar.gz
merge: fix build & tests with older tooling
-rw-r--r--Makefile.am2
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac13
-rw-r--r--libnm-core/nm-dbus-utils.c1
-rw-r--r--libnm-core/nm-setting.c8
-rw-r--r--libnm-util/nm-setting.c8
-rw-r--r--m4/compiler_warnings.m42
-rw-r--r--src/main-utils.c2
-rw-r--r--src/nm-connectivity.c2
-rw-r--r--src/ppp-manager/nm-ppp-manager.c1
-rw-r--r--src/settings/plugins/keyfile/writer.c2
-rw-r--r--src/supplicant-manager/nm-supplicant-manager.c2
-rw-r--r--src/systemd/nm-sd-adapt.h5
-rwxr-xr-xtools/test-networkmanager-service.py2
14 files changed, 43 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 18bb6c68c0..2420f3bbfd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/autogen.sh b/autogen.sh
index 141bcf120e..5ec9a5aa88 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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
diff --git a/configure.ac b/configure.ac
index 5f2eb2e851..442f25abd3 100644
--- a/configure.ac
+++ b/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])
diff --git a/libnm-core/nm-dbus-utils.c b/libnm-core/nm-dbus-utils.c
index 1f1e20cedc..4bdbdd0942 100644
--- a/libnm-core/nm-dbus-utils.c
+++ b/libnm-core/nm-dbus-utils.c
@@ -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 {
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index b78d9376ff..0791b0d198 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -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); \
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c
index 105981bc34..35ae01daf8 100644
--- a/libnm-util/nm-setting.c
+++ b/libnm-util/nm-setting.c
@@ -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); \
diff --git a/m4/compiler_warnings.m4 b/m4/compiler_warnings.m4
index 5c8d207770..a1c4e12884 100644
--- a/m4/compiler_warnings.m4
+++ b/m4/compiler_warnings.m4
@@ -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)
diff --git a/src/main-utils.c b/src/main-utils.c
index 1d899587ec..5378ca97a1 100644
--- a/src/main-utils.c
+++ b/src/main-utils.c
@@ -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"
diff --git a/src/nm-connectivity.c b/src/nm-connectivity.c
index 1dfcf00b15..f7e7576c22 100644
--- a/src/nm-connectivity.c
+++ b/src/nm-connectivity.c
@@ -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"
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index e27c82b70c..d410ebfab9 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -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"
diff --git a/src/settings/plugins/keyfile/writer.c b/src/settings/plugins/keyfile/writer.c
index 9cf119c0c8..b6a8786dc4 100644
--- a/src/settings/plugins/keyfile/writer.c
+++ b/src/settings/plugins/keyfile/writer.c
@@ -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"
diff --git a/src/supplicant-manager/nm-supplicant-manager.c b/src/supplicant-manager/nm-supplicant-manager.c
index d07e23aeab..083f2ebcb7 100644
--- a/src/supplicant-manager/nm-supplicant-manager.c
+++ b/src/supplicant-manager/nm-supplicant-manager.c
@@ -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"
diff --git a/src/systemd/nm-sd-adapt.h b/src/systemd/nm-sd-adapt.h
index 049b535c40..929ddc6378 100644
--- a/src/systemd/nm-sd-adapt.h
+++ b/src/systemd/nm-sd-adapt.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
diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py
index 50803c8871..6035fecd5c 100755
--- a/tools/test-networkmanager-service.py
+++ b/tools/test-networkmanager-service.py
@@ -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