Patches for structure packing....
Scott Bambrough
scottb@corelcomputer.com
Wed Apr 14 13:18:00 GMT 1999
The following patches force structures to be packed on the ARM. The structures
ether_addr and ether_header in ethernet.h must be packed in order for tcpdump to
function correctly. Actually tcpdump has its own version of these structures
but the principle is the same. Similarly the structure tftphdr must be packed
or tftp and tftpd will not function correctly.
The map structure in ksc5601 has a comment that states it should be packed in
all architechures. This is definitely not the case on the ARM.
1999-04-14 Scott Bambrough <scottb@netwinder.org>
* sysdeps/unix/sysv/linux/arm/net/ethernet.h:
struct ether_addr and struct ether_header must be packed on the ARM.
The default alignment constraints add padding to the end of the structures.
1999-04-14 Scott Bambrough <scottb@netwinder.org>
* inet/arpa/tftp.h:
struct tftphdr must be packed on the ARM. The default alignment constraints
add padding to the end of the structure and between members.
1999-04-14 Scott Bambrough <scottb@netwinder.org>
* iconvdata/ksc5601.h:
struct map should be packed on the ARM. The comment says the structure should
be
packed on all architechures. The default alignment constraints add padding to
the
end of the structure.
Index: ethernet.h
===================================================================
RCS file: /glibc/cvsfiles/libc/sysdeps/unix/sysv/linux/net/ethernet.h,v
retrieving revision 1.1
diff -r1.1 ethernet.h
36c36
< };
---
> } __attribute__((packed));
44c44
< };
---
> } __attribute__((packed));
More information about the Libc-hacker
mailing list