From 954e959146d865ab28c96691ae43213829e528de Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 12 May 2005 03:42:44 +0000 Subject: Define BYTE_PACK. --- cpukit/libnetworking/net/if_arp.h | 2 +- cpukit/libnetworking/netinet/if_ether.h | 4 ++++ cpukit/libnetworking/netinet/ip_icmp.h | 4 ++++ cpukit/libnetworking/netinet/ip_var.h | 4 ++++ cpukit/libnetworking/netinet/tcp.h | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/cpukit/libnetworking/net/if_arp.h b/cpukit/libnetworking/net/if_arp.h index 8edb6ec41c..29c407288c 100644 --- a/cpukit/libnetworking/net/if_arp.h +++ b/cpukit/libnetworking/net/if_arp.h @@ -33,7 +33,7 @@ #ifndef _NET_IF_ARP_H_ #define _NET_IF_ARP_H_ -#ifdef __rtems__ +#ifndef BYTE_PACK #define BYTE_PACK __attribute__((packed)) #endif diff --git a/cpukit/libnetworking/netinet/if_ether.h b/cpukit/libnetworking/netinet/if_ether.h index 5e39e43f2f..fba219ac35 100644 --- a/cpukit/libnetworking/netinet/if_ether.h +++ b/cpukit/libnetworking/netinet/if_ether.h @@ -40,6 +40,10 @@ #include #include +#ifndef BYTE_PACK +#define BYTE_PACK __attribute__((packed)) +#endif + #ifdef _KERNEL /* * Macro to map an IP multicast address to an Ethernet multicast address. diff --git a/cpukit/libnetworking/netinet/ip_icmp.h b/cpukit/libnetworking/netinet/ip_icmp.h index b99ae94521..f311697166 100644 --- a/cpukit/libnetworking/netinet/ip_icmp.h +++ b/cpukit/libnetworking/netinet/ip_icmp.h @@ -37,6 +37,10 @@ #ifndef _NETINET_IP_ICMP_H_ #define _NETINET_IP_ICMP_H_ +#ifndef BYTE_PACK +#define BYTE_PACK __attribute__((packed)) +#endif + /* * Interface Control Message Protocol Definitions. * Per RFC 792, September 1981. diff --git a/cpukit/libnetworking/netinet/ip_var.h b/cpukit/libnetworking/netinet/ip_var.h index 7d40243f24..75aeb94816 100644 --- a/cpukit/libnetworking/netinet/ip_var.h +++ b/cpukit/libnetworking/netinet/ip_var.h @@ -37,6 +37,10 @@ #ifndef _NETINET_IP_VAR_H_ #define _NETINET_IP_VAR_H_ +#ifndef BYTE_PACK +#define BYTE_PACK __attribute__((packed)) +#endif + /* * Overlay for ip header used by other protocols (tcp, udp). */ diff --git a/cpukit/libnetworking/netinet/tcp.h b/cpukit/libnetworking/netinet/tcp.h index 131d8011cf..9abe92627a 100644 --- a/cpukit/libnetworking/netinet/tcp.h +++ b/cpukit/libnetworking/netinet/tcp.h @@ -37,6 +37,10 @@ #ifndef _NETINET_TCP_H_ #define _NETINET_TCP_H_ +#ifndef BYTE_PACK +#define BYTE_PACK __attribute__((packed)) +#endif + typedef u_long tcp_seq; typedef u_long tcp_cc; /* connection count per rfc1644 */ -- cgit v1.2.3