changeset 13538:c3705095a078

1829 ipf and gcc4 could get along better Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Gordon Ross <gwr@nexenta.com>
author Richard Lowe <richlowe@richlowe.net>
date Mon, 16 May 2011 07:20:48 +0100
parents 349020ea69df
children 15b6c91053a3
files usr/src/uts/common/inet/ipf/netinet/ip_compat.h usr/src/uts/common/inet/ipf/netinet/ip_fil.h
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/inet/ipf/netinet/ip_compat.h	Tue Nov 29 10:32:13 2011 +0530
+++ b/usr/src/uts/common/inet/ipf/netinet/ip_compat.h	Mon May 16 07:20:48 2011 +0100
@@ -1759,7 +1759,7 @@
 # undef	offsetof
 #endif
 #ifndef offsetof
-# define offsetof(t,m) (int)((&((t *)0L)->m))
+# define offsetof(t,m) (size_t)((&((t *)0)->m))
 #endif
 
 /*
@@ -1777,7 +1777,7 @@
 # define	IP_HL(x)	(x)->ip_hl
 #endif
 #ifndef	IP_HL_A
-# define	IP_HL_A(x,y)	(x)->ip_hl = (y)
+# define	IP_HL_A(x,y)	(x)->ip_hl = ((y) & 0xf)
 #endif
 #ifndef	TCP_X2
 # define	TCP_X2(x)	(x)->th_x2
--- a/usr/src/uts/common/inet/ipf/netinet/ip_fil.h	Tue Nov 29 10:32:13 2011 +0530
+++ b/usr/src/uts/common/inet/ipf/netinet/ip_fil.h	Mon May 16 07:20:48 2011 +0100
@@ -669,7 +669,7 @@
 #define	FR_NOLOGTAG	0
 
 #ifndef	offsetof
-#define	offsetof(t,m)	(int)((&((t *)0L)->m))
+#define	offsetof(t,m)	(size_t)((&((t *)0)->m))
 #endif
 #define	FR_CMPSIZ	(sizeof(struct frentry) - \
 			 offsetof(struct frentry, fr_func))