[PATCH] Two small build fixes



Hi

Attached patch fixes a warning on 64-bit systems and includes <net/if.h>
instead of <linux/if.h> as libc headers should generally be preferred to
linux kernel headers, AFAIK; this fixes build on systems where
linux/if.h doesn't get installed as glibc already provides the necessary
structs and defines.

Ok to commit?

Regards,

Jürg
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/NetworkManager/ChangeLog,v
retrieving revision 1.898
diff -p -u -r1.898 ChangeLog
--- ChangeLog	24 Mar 2006 14:55:40 -0000	1.898
+++ ChangeLog	24 Mar 2006 21:35:43 -0000
@@ -1,3 +1,12 @@
+2006-03-24  Jürg Billeter  <j bitron ch>
+
+	* src/nm-logging.c: (fallback_get_backtrace): Add printf modifier to
+	  fix warning on 64-bit systems.
+	
+	* src/nm-netlink-monitor.c: Include <net/if.h> instead of <linux/if.h>
+	  to fix build on systems where unnecessary kernel headers don't get
+	  installed.
+
 2006-03-24  Christopher Aillon  <caillon redhat com>
 
 	* gnome/applet/applet-notifications.c:
Index: src/nm-logging.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-logging.c,v
retrieving revision 1.1
diff -p -u -r1.1 nm-logging.c
--- src/nm-logging.c	27 Feb 2006 04:31:52 -0000	1.1
+++ src/nm-logging.c	24 Mar 2006 21:35:44 -0000
@@ -46,7 +46,7 @@ fallback_get_backtrace (void)
 	{
 		syslog (LOG_CRIT, "******************* START **********************************");
 		for (i = 0; i < size; i++)
-			syslog (LOG_CRIT, "Frame %d: %s", i, strings[i]);
+			syslog (LOG_CRIT, "Frame %zd: %s", i, strings[i]);
 		free (strings);
 		syslog (LOG_CRIT, "******************* END **********************************");
 	}
Index: src/nm-netlink-monitor.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-netlink-monitor.c,v
retrieving revision 1.21
diff -p -u -r1.21 nm-netlink-monitor.c
--- src/nm-netlink-monitor.c	6 Mar 2006 01:10:58 -0000	1.21
+++ src/nm-netlink-monitor.c	24 Mar 2006 21:35:44 -0000
@@ -30,7 +30,7 @@
 #include <linux/types.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
-#include <linux/if.h>
+#include <net/if.h>
 #include <linux/unistd.h>
 #include <unistd.h>
 #include <stdio.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]