svn commit: r384340 - head/games/openbor/files
Jan Beich
jbeich at FreeBSD.org
Mon Apr 20 09:25:52 UTC 2015
Author: jbeich
Date: Mon Apr 20 09:25:51 2015
New Revision: 384340
URL: https://svnweb.freebsd.org/changeset/ports/384340
Log:
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
Added:
head/games/openbor/files/patch-source_webmlib_halloc_align.h (contents, props changed)
Added: head/games/openbor/files/patch-source_webmlib_halloc_align.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/openbor/files/patch-source_webmlib_halloc_align.h Mon Apr 20 09:25:51 2015 (r384340)
@@ -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
More information about the svn-ports-head
mailing list