Gentoo backend cleanups



Hi, all.

Here are some cleanups necessary to get the Gentoo backend to build with
the default build options on gcc 3.4.3.  I'm not sure about the strnlen
bit, but the rest should be good.

Daniel

Index: src/backends/NetworkManagerGentoo.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/backends/NetworkManagerGentoo.c,v
retrieving revision 1.9
diff -u -r1.9 NetworkManagerGentoo.c
--- src/backends/NetworkManagerGentoo.c	5 Dec 2004 21:28:42 -0000	1.9
+++ src/backends/NetworkManagerGentoo.c	6 Dec 2004 16:42:34 -0000
@@ -27,6 +27,9 @@
 #include <sys/types.h>
 #include <signal.h>
 #include <string.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
 #include "NetworkManagerSystem.h"
 #include "NetworkManagerUtils.h"
 
@@ -56,8 +59,8 @@
 gboolean nm_system_device_run_dhcp (NMDevice *dev)
 {
 	char		 buf [500];
-	char 		*iface;
-	int		 err;
+	const char	*iface;
+	int			 err;
 
 	g_return_val_if_fail (dev != NULL, FALSE);
 
@@ -82,6 +85,7 @@
  * no sense in keeping the dhcp daemon running on the old interface.
  *
  */
+extern size_t strnlen (const char *, size_t);
 void nm_system_device_stop_dhcp (NMDevice *dev)
 {
 	FILE			*pidfile;
@@ -163,15 +167,15 @@
  */
 gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
 {
-	syslog (LOG_WARNING, "nm_system_device_setup_static_ip4_config() is not implemented yet for this distribution.\n");
 #define IPBITS  (sizeof (guint32) * 8)
 	struct in_addr	ip_addr, net_addr, broad_addr, gate_addr;
 	int			i, err;
 	guint32		prefix = IPBITS;
-	char		*iface;
+	const char	*iface;
 	char		*buf;
 	char		*addr, *netmask, *broadcast, *gateway;
 	
+	syslog (LOG_WARNING, "nm_system_device_setup_static_ip4_config() is not implemented yet for this distribution.\n");
 	
 	/* Extract the addresses back into strings */
 




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