# HG changeset patch # User mru # Date 1247818903 0 # Node ID 7562cfd794daf5bf1fc2258e9f7befb2816c8c30 # Parent 1df555475f887e4e6aa3040be9bcb13f64097477 Check for __attribute__((packed)) support Not all compilers claiming to be gcc support this attribute. diff -r 1df555475f88 -r 7562cfd794da intreadwrite.h --- a/intreadwrite.h Fri Jul 17 04:30:49 2009 +0000 +++ b/intreadwrite.h Fri Jul 17 08:21:43 2009 +0000 @@ -42,7 +42,7 @@ * by per-arch headers. */ -#if defined(__GNUC__) +#if HAVE_ATTRIBUTE_PACKED struct unaligned_64 { uint64_t l; } __attribute__((packed)); struct unaligned_32 { uint32_t l; } __attribute__((packed));