From 8cd0de231a27d26e719f1b747f95ae53f5fec59e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 4 Mar 2014 14:30:01 +0100 Subject: [PATCH] tivial/core: move common #defines to header file Signed-off-by: Thomas Haller --- src/devices/nm-device.c | 8 -------- src/platform/nm-platform.c | 8 -------- src/platform/nm-platform.h | 8 ++++++++ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index aba8ff4bb..02ce08ff2 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -74,14 +74,6 @@ #include "nm-device-bond.h" #include "nm-device-team.h" -/* workaround for older libnl version, that does not define these flags. */ -#ifndef IFA_F_MANAGETEMPADDR -#define IFA_F_MANAGETEMPADDR 0x100 -#endif -#ifndef IFA_F_NOPREFIXROUTE -#define IFA_F_NOPREFIXROUTE 0x200 -#endif - static void impl_device_disconnect (NMDevice *device, DBusGMethodInvocation *context); #include "nm-device-glue.h" diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 49ab6c016..364447d5b 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -33,14 +33,6 @@ #include "nm-logging.h" #include "nm-enum-types.h" -/* workaround for older libnl version, that does not define these flags. */ -#ifndef IFA_F_MANAGETEMPADDR -#define IFA_F_MANAGETEMPADDR 0x100 -#endif -#ifndef IFA_F_NOPREFIXROUTE -#define IFA_F_NOPREFIXROUTE 0x200 -#endif - #define debug(...) nm_log_dbg (LOGD_PLATFORM, __VA_ARGS__) #define NM_PLATFORM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_PLATFORM, NMPlatformPrivate)) diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 88bb5f1bc..226542c57 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -36,6 +36,14 @@ /******************************************************************/ +/* workaround for older libnl version, that does not define these flags. */ +#ifndef IFA_F_MANAGETEMPADDR +#define IFA_F_MANAGETEMPADDR 0x100 +#endif +#ifndef IFA_F_NOPREFIXROUTE +#define IFA_F_NOPREFIXROUTE 0x200 +#endif + typedef enum { /* no error specified, sometimes this means the arguments were wrong */ NM_PLATFORM_ERROR_NONE,