summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog1
-rw-r--r--cpukit/libnetworking/netinet/ip.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 00478ab630..a2f14f4a0f 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,6 @@
2007-03-29 Ralf Corsépius <ralf.corsepius@rtems.org>
+ * libnetworking/netinet/ip.h: Add FreeBSD's alignement macros.
* libnetworking/net/netisr.h: Partial update from FreeBSD.
* libcsupport/src/getpwent.c: Remove bogus cast to long.
* libnetworking/libc/strsep.c: Don't build if provided by libc.
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))