Skip to content

Commit

Permalink
Fix build with MinGW 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
AlienCowEatCake committed Jun 28, 2020
1 parent 195b89b commit 1c0443b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ThirdParty/aom/aom-v2.0.0/aom/aom_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extern "C" {

/*!\brief Decorator indicating that given struct/union/enum is packed */
#ifndef ATTRIBUTE_PACKED
#if defined(__GNUC__) && __GNUC__
#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
#define ATTRIBUTE_PACKED __attribute__((packed))
#elif defined(_MSC_VER)
#define ATTRIBUTE_PACKED
Expand Down
12 changes: 12 additions & 0 deletions src/ThirdParty/aom/patches/0001-Fix-build-with-MinGW-3.4.2.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
diff -Nur aom-v2.0.0.orig/aom/aom_codec.h aom-v2.0.0/aom/aom_codec.h
--- aom-v2.0.0.orig/aom/aom_codec.h 2020-06-24 21:14:38.000000000 +0700
+++ aom-v2.0.0/aom/aom_codec.h 2020-06-28 20:43:18.127643020 +0700
@@ -78,7 +78,7 @@

/*!\brief Decorator indicating that given struct/union/enum is packed */
#ifndef ATTRIBUTE_PACKED
-#if defined(__GNUC__) && __GNUC__
+#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
#define ATTRIBUTE_PACKED __attribute__((packed))
#elif defined(_MSC_VER)
#define ATTRIBUTE_PACKED
diff -Nur aom-v2.0.0.orig/av1/encoder/ratectrl.h aom-v2.0.0/av1/encoder/ratectrl.h
--- aom-v2.0.0.orig/av1/encoder/ratectrl.h 2020-06-24 21:14:39.000000000 +0700
+++ aom-v2.0.0/av1/encoder/ratectrl.h 2020-06-27 02:44:52.920384028 +0700
Expand Down

0 comments on commit 1c0443b

Please sign in to comment.