From ef0b69d12fa94abe42fd01a9dfece6ca0beb3cdf Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 29 Mar 2007 14:28:49 +0000 Subject: =?UTF-8?q?2007-03-29=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libnetworking/netinet/ip.h: Add FreeBSD's alignement macros. --- cpukit/libnetworking/netinet/ip.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cpukit/libnetworking/netinet') diff --git a/cpukit/libnetworking/netinet/ip.h b/cpukit/libnetworking/netinet/ip.h index 148f68874e..a17d0194c3 100644 --- a/cpukit/libnetworking/netinet/ip.h +++ b/cpukit/libnetworking/netinet/ip.h @@ -48,8 +48,10 @@ #ifndef __packed #if defined(__GNUC__) #define __packed __attribute__((packed)) +#define __aligned(x) __attribute__((aligned(x))) #else #define __packed +#define __aligned(x) #endif #endif @@ -81,7 +83,7 @@ struct ip { u_char ip_p; /* protocol */ u_short ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -} __packed; +} __packed __aligned(4); #ifdef _IP_VHL #define IP_MAKE_VHL(v, hl) ((v) << 4 | (hl)) -- cgit v1.2.3