summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure5
-rw-r--r--libavutil/intreadwrite.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/configure b/configure
index 435f9f42e1..9a614a5abe 100755
--- a/configure
+++ b/configure
@@ -899,6 +899,7 @@ HAVE_LIST="
alsa_asoundlib_h
altivec_h
arpa_inet_h
+ attribute_packed
bigendian
bswap
closesocket
@@ -2165,6 +2166,10 @@ void foo(char * $restrict_keyword p);
EOF
done
+check_cc <<EOF && enable attribute_packed
+struct { int x; } __attribute__((packed)) x;
+EOF
+
##########################################
# SDL check
diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h
index ee597937b9..d46595eea7 100644
--- a/libavutil/intreadwrite.h
+++ b/libavutil/intreadwrite.h
@@ -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));