Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2015 09:25:52 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r384340 - head/games/openbor/files
Message-ID:  <201504200925.t3K9Pqft004438@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504200925.t3K9Pqft004438>