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

[MiNT] [PATCH] Fix compilation with debug information in INET4.XDD



Hello.

I noticed that INET4.XDD didn't compile with debug information turned on by defining DEV_DEBUG in sys/sockets/global.h. Here is a patch.

inet4_dbg.patch
Fix compilation when DEV_DEBUG is defined. Contributed by Vincent Riviere.

--
Vincent Rivière
diff -aurN -x CVS freemint.orig/sys/sockets/inet4/if.c freemint/sys/sockets/inet4/if.c
--- freemint.orig/sys/sockets/inet4/if.c	2014-09-04 00:47:44.843750000 +0200
+++ freemint/sys/sockets/inet4/if.c	2014-09-04 20:02:43.296875000 +0200
@@ -729,7 +729,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.dstaddr.sa_family));
+					ifr->ifru.dstadr.sa.sa_family));
 				return EINVAL;
 			}
 			
@@ -751,7 +751,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.dstaddr.sa_family));
+					ifr->ifru.dstadr.sa.sa_family));
 				return EINVAL;
 			}
 			
@@ -783,7 +783,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.addr.sa_family));
+					ifr->ifru.dstadr.sa.sa_family));
 				return EINVAL;
 			}
 			
@@ -811,7 +811,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.broadaddr.sa_family));
+					ifr->ifru.broadadr.sa.sa_family));
 				return EINVAL;
 			}
 			
@@ -833,7 +833,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.broadaddr.sa_family));
+					ifr->ifru.broadadr.sa.sa_family));
 				return EINVAL;
 			}
 			
@@ -861,7 +861,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.netmask.sa_family));
+					ifr->ifru.netmsk.sa.sa_family));
 				return EINVAL;
 			}
 			
@@ -880,7 +880,7 @@
 			{
 				DEBUG (("if_ioctl: %d: interface has no addr "
 					"in this AF",
-					ifr->ifru.netmask.sa_family));
+					ifr->ifru.netmsk.sa.sa_family));
 				return EINVAL;
 			}