summary refs log tree commit diff
path: root/libnm-util
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-05-11 14:55:55 +0200
committerMichael Biebl <biebl@debian.org>2017-05-11 14:55:55 +0200
commitc333f062ddcba9b35330647bf6cbd0a07f2d786e (patch)
tree257c3a0c74c09f4ad2328eab5b932806405f0c1c /libnm-util
parenta222e56e103f949b148a6942e385ccca2c26d9f3 (diff)
New upstream version 1.8.0 upstream/1.8.0
Diffstat (limited to 'libnm-util')
-rw-r--r--libnm-util/NetworkManager.h2
-rw-r--r--libnm-util/crypto_nss.c4
-rw-r--r--libnm-util/nm-connection.h56
-rw-r--r--libnm-util/nm-param-spec-specialized.c9
-rw-r--r--libnm-util/nm-setting-8021x.c4
-rw-r--r--libnm-util/nm-setting-8021x.h2
-rw-r--r--libnm-util/nm-setting-adsl.h2
-rw-r--r--libnm-util/nm-setting-bond.h2
-rw-r--r--libnm-util/nm-setting-bridge-port.h2
-rw-r--r--libnm-util/nm-setting-bridge.h2
-rw-r--r--libnm-util/nm-setting-cdma.h2
-rw-r--r--libnm-util/nm-setting-connection.c4
-rw-r--r--libnm-util/nm-setting-dcb.h2
-rw-r--r--libnm-util/nm-setting-generic.h2
-rw-r--r--libnm-util/nm-setting-gsm.h2
-rw-r--r--libnm-util/nm-setting-infiniband.h2
-rw-r--r--libnm-util/nm-setting-olpc-mesh.h2
-rw-r--r--libnm-util/nm-setting-ppp.h2
-rw-r--r--libnm-util/nm-setting-pppoe.h2
-rw-r--r--libnm-util/nm-setting-serial.h2
-rw-r--r--libnm-util/nm-setting-team-port.h2
-rw-r--r--libnm-util/nm-setting-team.h2
-rw-r--r--libnm-util/nm-setting-vlan.c4
-rw-r--r--libnm-util/nm-setting-vpn.h2
-rw-r--r--libnm-util/nm-setting-wimax.h2
-rw-r--r--libnm-util/nm-setting-wired.h2
-rw-r--r--libnm-util/nm-setting-wireless-security.c8
-rw-r--r--libnm-util/nm-setting-wireless-security.h2
-rw-r--r--libnm-util/nm-setting-wireless.h6
-rw-r--r--libnm-util/nm-setting.h2
-rw-r--r--libnm-util/nm-version.h16
31 files changed, 86 insertions, 69 deletions
diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h
index 77c09ae3..5e1c3f9f 100644
--- a/libnm-util/NetworkManager.h
+++ b/libnm-util/NetworkManager.h
@@ -28,7 +28,7 @@
 
 /* This header must not include glib or libnm. */
 
-#include <nm-version-macros.h>
+#include "nm-version-macros.h"
 
 /*
  * dbus services details
diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c
index 4e60d2e9..b55af774 100644
--- a/libnm-util/crypto_nss.c
+++ b/libnm-util/crypto_nss.c
@@ -79,7 +79,7 @@ crypto_md5_hash (const char *salt,
 {
 	PK11Context *ctx;
 	int nkey = buflen;
-	unsigned int digest_len;
+	unsigned digest_len;
 	int count = 0;
 	char digest[MD5_HASH_LEN];
 	char *p = buffer;
@@ -144,7 +144,7 @@ crypto_decrypt (const char *cipher,
 	PK11Context *ctx = NULL;
 	SECStatus s;
 	gboolean success = FALSE;
-	unsigned int pad_len = 0, extra = 0;
+	unsigned pad_len = 0, extra = 0;
 	guint32 i, real_iv_len = 0;
 
 	if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) {
diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h
index 2cee2be5..6e119c2c 100644
--- a/libnm-util/nm-connection.h
+++ b/libnm-util/nm-connection.h
@@ -25,34 +25,34 @@
 
 #include <glib.h>
 #include <glib-object.h>
-#include <nm-setting.h>
-
-#include <nm-setting-8021x.h>
-#include <nm-setting-bluetooth.h>
-#include <nm-setting-bond.h>
-#include <nm-setting-team.h>
-#include <nm-setting-team-port.h>
-#include <nm-setting-bridge.h>
-#include <nm-setting-bridge-port.h>
-#include <nm-setting-cdma.h>
-#include <nm-setting-connection.h>
-#include <nm-setting-dcb.h>
-#include <nm-setting-generic.h>
-#include <nm-setting-gsm.h>
-#include <nm-setting-infiniband.h>
-#include <nm-setting-ip4-config.h>
-#include <nm-setting-ip6-config.h>
-#include <nm-setting-olpc-mesh.h>
-#include <nm-setting-ppp.h>
-#include <nm-setting-pppoe.h>
-#include <nm-setting-serial.h>
-#include <nm-setting-vpn.h>
-#include <nm-setting-wimax.h>
-#include <nm-setting-wired.h>
-#include <nm-setting-adsl.h>
-#include <nm-setting-wireless.h>
-#include <nm-setting-wireless-security.h>
-#include <nm-setting-vlan.h>
+#include "nm-setting.h"
+
+#include "nm-setting-8021x.h"
+#include "nm-setting-bluetooth.h"
+#include "nm-setting-bond.h"
+#include "nm-setting-team.h"
+#include "nm-setting-team-port.h"
+#include "nm-setting-bridge.h"
+#include "nm-setting-bridge-port.h"
+#include "nm-setting-cdma.h"
+#include "nm-setting-connection.h"
+#include "nm-setting-dcb.h"
+#include "nm-setting-generic.h"
+#include "nm-setting-gsm.h"
+#include "nm-setting-infiniband.h"
+#include "nm-setting-ip4-config.h"
+#include "nm-setting-ip6-config.h"
+#include "nm-setting-olpc-mesh.h"
+#include "nm-setting-ppp.h"
+#include "nm-setting-pppoe.h"
+#include "nm-setting-serial.h"
+#include "nm-setting-vpn.h"
+#include "nm-setting-wimax.h"
+#include "nm-setting-wired.h"
+#include "nm-setting-adsl.h"
+#include "nm-setting-wireless.h"
+#include "nm-setting-wireless-security.h"
+#include "nm-setting-vlan.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-param-spec-specialized.c b/libnm-util/nm-param-spec-specialized.c
index 7021e108..a4e01d8f 100644
--- a/libnm-util/nm-param-spec-specialized.c
+++ b/libnm-util/nm-param-spec-specialized.c
@@ -30,7 +30,6 @@ struct _NMParamSpecSpecialized {
 };
 
 #include <string.h>
-#include <math.h>
 #include <netinet/in.h>
 #include <dbus/dbus-glib.h>
 
@@ -157,15 +156,19 @@ _gvalues_compare_fixed (const GValue *value1, const GValue *value2)
 	case G_TYPE_FLOAT: {
 		gfloat val1 = g_value_get_float (value1);
 		gfloat val2 = g_value_get_float (value2);
+		float diff = val1 - val2;
+
 		/* Can't use == or != here due to inexactness of FP */
-		if (fabsf (val1 - val2) > FLOAT_FACTOR)
+		if (diff > FLOAT_FACTOR || diff < -FLOAT_FACTOR)
 			ret = val1 < val2 ? -1 : val1 > val2;
 		break;
 	}
 	case G_TYPE_DOUBLE: {
 		gdouble val1 = g_value_get_double (value1);
 		gdouble val2 = g_value_get_double (value2);
-		if (fabs (val1 - val2) > FLOAT_FACTOR)
+		double diff = val1 - val2;
+
+		if (diff > FLOAT_FACTOR || diff < -FLOAT_FACTOR)
 			ret = val1 < val2 ? -1 : val1 > val2;
 		break;
 	}
diff --git a/libnm-util/nm-setting-8021x.c b/libnm-util/nm-setting-8021x.c
index 03165bda..5cb19818 100644
--- a/libnm-util/nm-setting-8021x.c
+++ b/libnm-util/nm-setting-8021x.c
@@ -3560,7 +3560,7 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
 	 * #NMSetting8021x:private-key-password property must be set to password
 	 * used to decrypt the PKCS#<!-- -->12 certificate and key. When using PKCS#<!-- -->12 files
 	 * and the path scheme, this property should be set to the full UTF-8
-	 * encoded path of the key, prefixed with the string "file://" and and
+	 * encoded path of the key, prefixed with the string "file://" and
 	 * ending with a terminating NUL byte, and as with the blob scheme the
 	 * "private-key-password" property must be set to the password used to
 	 * decode the PKCS#<!-- -->12 private key and certificate.
@@ -3632,7 +3632,7 @@ nm_setting_802_1x_class_init (NMSetting8021xClass *setting_class)
 	 * password used to decrypt the PKCS#<!-- -->12 certificate and key. When using
 	 * PKCS#<!-- -->12 files and the path scheme, this property should be set to the
 	 * full UTF-8 encoded path of the key, prefixed with the string "file://"
-	 * and and ending with a terminating NUL byte, and as with the blob scheme
+	 * and ending with a terminating NUL byte, and as with the blob scheme
 	 * the #NMSetting8021x:phase2-private-key-password property must be set to
 	 * the password used to decode the PKCS#<!-- -->12 private key and certificate.
 	 *
diff --git a/libnm-util/nm-setting-8021x.h b/libnm-util/nm-setting-8021x.h
index 62b43905..3de8f4c3 100644
--- a/libnm-util/nm-setting-8021x.h
+++ b/libnm-util/nm-setting-8021x.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_8021X_H
 #define NM_SETTING_8021X_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-adsl.h b/libnm-util/nm-setting-adsl.h
index 82af6ebd..777f0b36 100644
--- a/libnm-util/nm-setting-adsl.h
+++ b/libnm-util/nm-setting-adsl.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_ADSL_H
 #define NM_SETTING_ADSL_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-bond.h b/libnm-util/nm-setting-bond.h
index 172bb4cf..efef82c8 100644
--- a/libnm-util/nm-setting-bond.h
+++ b/libnm-util/nm-setting-bond.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_BOND_H
 #define NM_SETTING_BOND_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-bridge-port.h b/libnm-util/nm-setting-bridge-port.h
index fcaf22ed..76527aef 100644
--- a/libnm-util/nm-setting-bridge-port.h
+++ b/libnm-util/nm-setting-bridge-port.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_BRIDGE_PORT_H
 #define NM_SETTING_BRIDGE_PORT_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-bridge.h b/libnm-util/nm-setting-bridge.h
index f6b59262..bd741415 100644
--- a/libnm-util/nm-setting-bridge.h
+++ b/libnm-util/nm-setting-bridge.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_BRIDGE_H
 #define NM_SETTING_BRIDGE_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-cdma.h b/libnm-util/nm-setting-cdma.h
index eee44205..e2c0376e 100644
--- a/libnm-util/nm-setting-cdma.h
+++ b/libnm-util/nm-setting-cdma.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_CDMA_H
 #define NM_SETTING_CDMA_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-connection.c b/libnm-util/nm-setting-connection.c
index e6fe2fe4..28d5fca7 100644
--- a/libnm-util/nm-setting-connection.c
+++ b/libnm-util/nm-setting-connection.c
@@ -278,10 +278,10 @@ nm_setting_connection_get_connection_type (NMSettingConnection *setting)
  * nm_setting_connection_get_num_permissions:
  * @setting: the #NMSettingConnection
  *
- * Returns the number of entires in the #NMSettingConnection:permissions
+ * Returns the number of entries in the #NMSettingConnection:permissions
  * property of this setting.
  *
- * Returns: the number of permissions entires
+ * Returns: the number of permissions entries
  */
 guint32
 nm_setting_connection_get_num_permissions (NMSettingConnection *setting)
diff --git a/libnm-util/nm-setting-dcb.h b/libnm-util/nm-setting-dcb.h
index ac34521e..626f815d 100644
--- a/libnm-util/nm-setting-dcb.h
+++ b/libnm-util/nm-setting-dcb.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_DCB_H
 #define NM_SETTING_DCB_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-generic.h b/libnm-util/nm-setting-generic.h
index 1cabae08..f3b07f69 100644
--- a/libnm-util/nm-setting-generic.h
+++ b/libnm-util/nm-setting-generic.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_GENERIC_H
 #define NM_SETTING_GENERIC_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-gsm.h b/libnm-util/nm-setting-gsm.h
index 564a8b4b..438c6b3b 100644
--- a/libnm-util/nm-setting-gsm.h
+++ b/libnm-util/nm-setting-gsm.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_GSM_H
 #define NM_SETTING_GSM_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-infiniband.h b/libnm-util/nm-setting-infiniband.h
index dff38450..95d343e9 100644
--- a/libnm-util/nm-setting-infiniband.h
+++ b/libnm-util/nm-setting-infiniband.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_INFINIBAND_H
 #define NM_SETTING_INFINIBAND_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-olpc-mesh.h b/libnm-util/nm-setting-olpc-mesh.h
index 54b268e2..1764406e 100644
--- a/libnm-util/nm-setting-olpc-mesh.h
+++ b/libnm-util/nm-setting-olpc-mesh.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_OLPC_MESH_H
 #define NM_SETTING_OLPC_MESH_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-ppp.h b/libnm-util/nm-setting-ppp.h
index 5733902b..52856463 100644
--- a/libnm-util/nm-setting-ppp.h
+++ b/libnm-util/nm-setting-ppp.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_PPP_H
 #define NM_SETTING_PPP_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-pppoe.h b/libnm-util/nm-setting-pppoe.h
index 9d04af9e..9f8add4e 100644
--- a/libnm-util/nm-setting-pppoe.h
+++ b/libnm-util/nm-setting-pppoe.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_PPPOE_H
 #define NM_SETTING_PPPOE_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-serial.h b/libnm-util/nm-setting-serial.h
index 44d46cf3..bca9abae 100644
--- a/libnm-util/nm-setting-serial.h
+++ b/libnm-util/nm-setting-serial.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_SERIAL_H
 #define NM_SETTING_SERIAL_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-team-port.h b/libnm-util/nm-setting-team-port.h
index 4e802220..2da6518b 100644
--- a/libnm-util/nm-setting-team-port.h
+++ b/libnm-util/nm-setting-team-port.h
@@ -21,7 +21,7 @@
 #ifndef NM_SETTING_TEAM_PORT_H
 #define NM_SETTING_TEAM_PORT_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-team.h b/libnm-util/nm-setting-team.h
index d67c8c71..87aa7695 100644
--- a/libnm-util/nm-setting-team.h
+++ b/libnm-util/nm-setting-team.h
@@ -21,7 +21,7 @@
 #ifndef NM_SETTING_TEAM_H
 #define NM_SETTING_TEAM_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-vlan.c b/libnm-util/nm-setting-vlan.c
index 3437d697..3cddb3f9 100644
--- a/libnm-util/nm-setting-vlan.c
+++ b/libnm-util/nm-setting-vlan.c
@@ -286,7 +286,7 @@ nm_setting_vlan_add_priority_str (NMSettingVlan *setting,
  * @setting: the #NMSettingVlan
  * @map: the type of priority map
  *
- * Returns the number of entires in the
+ * Returns the number of entries in the
  * #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map
  * properties of this setting.
  *
@@ -499,7 +499,7 @@ nm_setting_vlan_remove_priority_str_by_value (NMSettingVlan *setting,
  * @setting: the #NMSettingVlan
  * @map: the type of priority map
  *
- * Clear all the entires from #NMSettingVlan:ingress_priority_map or
+ * Clear all the entries from #NMSettingVlan:ingress_priority_map or
  * #NMSettingVlan:egress_priority_map properties.
  */
 void
diff --git a/libnm-util/nm-setting-vpn.h b/libnm-util/nm-setting-vpn.h
index acce6e63..ba952f42 100644
--- a/libnm-util/nm-setting-vpn.h
+++ b/libnm-util/nm-setting-vpn.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_VPN_H
 #define NM_SETTING_VPN_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-wimax.h b/libnm-util/nm-setting-wimax.h
index 9d7a07af..45e53352 100644
--- a/libnm-util/nm-setting-wimax.h
+++ b/libnm-util/nm-setting-wimax.h
@@ -22,7 +22,7 @@
 #ifndef NM_SETTING_WIMAX_H
 #define NM_SETTING_WIMAX_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-wired.h b/libnm-util/nm-setting-wired.h
index 33d6d54d..08a39153 100644
--- a/libnm-util/nm-setting-wired.h
+++ b/libnm-util/nm-setting-wired.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_WIRED_H
 #define NM_SETTING_WIRED_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-wireless-security.c b/libnm-util/nm-setting-wireless-security.c
index fd8eb976..22808fea 100644
--- a/libnm-util/nm-setting-wireless-security.c
+++ b/libnm-util/nm-setting-wireless-security.c
@@ -206,7 +206,7 @@ nm_setting_wireless_security_get_proto (NMSettingWirelessSecurity *setting, guin
  * by this connection only supports WPA2/RSN, the connection cannot be used
  * with the access point.
  *
- * Returns: %TRUE if the protocol was new and and was added to the allowed
+ * Returns: %TRUE if the protocol was new and was added to the allowed
  * protocol list, or %FALSE if it was already in the list
  **/
 gboolean
@@ -260,7 +260,7 @@ nm_setting_wireless_security_remove_proto (NMSettingWirelessSecurity *setting, g
  *
  * Removes a protocol from the allowed protocol list.
  *
- * Returns: %TRUE if the protocol was found and removed; %FALSE it it was not.
+ * Returns: %TRUE if the protocol was found and removed; %FALSE if it was not.
  *
  * Since: 0.9.10
  **/
@@ -408,7 +408,7 @@ nm_setting_wireless_security_remove_pairwise (NMSettingWirelessSecurity *setting
  * Removes an encryption algorithm from the allowed pairwise encryption
  * algorithm list.
  *
- * Returns: %TRUE if the encryption algorith was found and removed; %FALSE it it was not.
+ * Returns: %TRUE if the encryption algorith was found and removed; %FALSE if it was not.
  *
  * Since: 0.9.10
  **/
@@ -558,7 +558,7 @@ nm_setting_wireless_security_remove_group (NMSettingWirelessSecurity *setting, g
  * Removes an encryption algorithm from the allowed groupwise encryption
  * algorithm list.
  *
- * Returns: %TRUE if the algorithm was found and removed; %FALSE it it was not.
+ * Returns: %TRUE if the algorithm was found and removed; %FALSE if it was not.
  *
  * Since: 0.9.10
  **/
diff --git a/libnm-util/nm-setting-wireless-security.h b/libnm-util/nm-setting-wireless-security.h
index 97a456b0..1140582b 100644
--- a/libnm-util/nm-setting-wireless-security.h
+++ b/libnm-util/nm-setting-wireless-security.h
@@ -23,7 +23,7 @@
 #ifndef NM_SETTING_WIRELESS_SECURITY_H
 #define NM_SETTING_WIRELESS_SECURITY_H
 
-#include <nm-setting.h>
+#include "nm-setting.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting-wireless.h b/libnm-util/nm-setting-wireless.h
index 77eff73e..5a64f0a0 100644
--- a/libnm-util/nm-setting-wireless.h
+++ b/libnm-util/nm-setting-wireless.h
@@ -23,9 +23,9 @@
 #ifndef NM_SETTING_WIRELESS_H
 #define NM_SETTING_WIRELESS_H
 
-#include <NetworkManager.h>
-#include <nm-setting.h>
-#include <nm-setting-wireless-security.h>
+#include "NetworkManager.h"
+#include "nm-setting.h"
+#include "nm-setting-wireless-security.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h
index 28c6975a..ce5cf3f5 100644
--- a/libnm-util/nm-setting.h
+++ b/libnm-util/nm-setting.h
@@ -26,7 +26,7 @@
 #include <glib.h>
 #include <glib-object.h>
 
-#include <nm-version.h>
+#include "nm-version.h"
 
 G_BEGIN_DECLS
 
diff --git a/libnm-util/nm-version.h b/libnm-util/nm-version.h
index b8b32306..d4c66ea0 100644
--- a/libnm-util/nm-version.h
+++ b/libnm-util/nm-version.h
@@ -23,7 +23,7 @@
 
 #include <glib.h>
 
-#include <nm-version-macros.h>
+#include "nm-version-macros.h"
 
 /* Deprecation / Availability macros */
 
@@ -118,4 +118,18 @@
 # define NM_AVAILABLE_IN_1_6
 #endif
 
+#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_8
+# define NM_DEPRECATED_IN_1_8           G_DEPRECATED
+# define NM_DEPRECATED_IN_1_8_FOR(f)    G_DEPRECATED_FOR(f)
+#else
+# define NM_DEPRECATED_IN_1_8
+# define NM_DEPRECATED_IN_1_8_FOR(f)
+#endif
+
+#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_8
+# define NM_AVAILABLE_IN_1_8            G_UNAVAILABLE(1,8)
+#else
+# define NM_AVAILABLE_IN_1_8
+#endif
+
 #endif  /* NM_VERSION_H */