Index: wmnetmon-0.2p6/pinger.c
===================================================================
--- wmnetmon-0.2p6.orig/pinger.c
+++ wmnetmon-0.2p6/pinger.c
@@ -280,7 +280,11 @@
 						/* Calculate port */
 						
 						if (icp->ICMP_TYPE == ICMP_UNREACH){
+#ifdef HAVE_STRUCT_ICMP
+						 iph = &icp->icmp_ip;
+#else
 						 iph = (struct ip*)((char*)icp + sizeof(STRUCT_ICMP));
+#endif
 						if (iph->ip_p == IPPROTO_UDP) {
 							udph = (struct udphdr *)
 							   ((char *)iph + sizeof(struct ip));
