aboutsummaryrefslogtreecommitdiffstats
path: root/games/openbor
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2015-04-20 17:25:51 +0800
committerjbeich <jbeich@FreeBSD.org>2015-04-20 17:25:51 +0800
commita887704e363d3c62d04f1dcd72f1898f12d4f0c8 (patch)
tree0354f6bd27a9f640d575970df15acad39a6f1cb5 /games/openbor
parent57f39b0c8391fe37d9bb531d561dfacccf13c152 (diff)
downloadfreebsd-ports-gnome-a887704e363d3c62d04f1dcd72f1898f12d4f0c8.tar.gz
freebsd-ports-gnome-a887704e363d3c62d04f1dcd72f1898f12d4f0c8.tar.zst
freebsd-ports-gnome-a887704e363d3c62d04f1dcd72f1898f12d4f0c8.zip
Unbreak build with gcc5 (and clang in future)
In file included from source/webmlib/halloc/halloc.c:19:0: source/webmlib/halloc/align.h:42:25: error: conflicting types for 'max_align_t' typedef union max_align max_align_t; ^ In file included from source/webmlib/halloc/halloc.h:18:0, from source/webmlib/halloc/halloc.c:18: /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd11.0/5.0.1/include/stddef.h:429:3: note: previous declaration of 'max_align_t' was here } max_align_t; ^ Reported by: DPorts
Diffstat (limited to 'games/openbor')
-rw-r--r--games/openbor/files/patch-source_webmlib_halloc_align.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/games/openbor/files/patch-source_webmlib_halloc_align.h b/games/openbor/files/patch-source_webmlib_halloc_align.h
new file mode 100644
index 000000000000..152db1ef5d00
--- /dev/null
+++ b/games/openbor/files/patch-source_webmlib_halloc_align.h
@@ -0,0 +1,24 @@
+GCC 5.0 defaults to -std=gnu11 which exposes max_align_t in its stddef.h.
+Clang also provides max_align_t but not on FreeBSD (see bug 193594).
+
+ In file included from source/webmlib/halloc/halloc.c:19:0:
+ source/webmlib/halloc/align.h:42:25: error: conflicting types for 'max_align_t'
+ typedef union max_align max_align_t;
+ ^
+ In file included from source/webmlib/halloc/halloc.h:18:0,
+ from source/webmlib/halloc/halloc.c:18:
+ /usr/local/lib/gcc5/**/include/stddef.h:429:3: note: previous declaration of 'max_align_t' was here
+ } max_align_t;
+ ^
+
+--- source/webmlib/halloc/align.h.orig 2015-04-09 22:13:36 UTC
++++ source/webmlib/halloc/align.h
+@@ -22,7 +22,7 @@
+ */
+ typedef double max_align_t;
+
+-#else
++#elif !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+
+ /*
+ * a type with the most strict alignment requirements