Bug 222402

Summary: games/simutrans: Fix build on -CURRENT after llvm 5.x import
Product: Ports & Packages Reporter: chardon.frederic
Component: Individual Port(s)Assignee: Jan Beich <jbeich>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: patch
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
move math.h before the definition of the type() macro none

Description chardon.frederic 2017-09-17 13:37:47 UTC
Created attachment 186468 [details]
move math.h before the definition of the type() macro

The fix is identical as r447202 for openttd.

Upstream fixed this by renaming the offending macro.
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-09-21 23:27:39 UTC
A commit references this bug:

Author: jbeich
Date: Thu Sep 21 23:26:46 UTC 2017
New revision: 450309
URL: https://svnweb.freebsd.org/changeset/ports/450309

Log:
  games/simutrans: unbreak with libc++ 5.0

  In file included from squirrel/squirrel/sqvm.cc:5:
  In file included from /usr/include/c++/v1/math.h:310:
  /usr/include/c++/v1/limits:233:91: error: member reference base type 'int' is not a structure or union
      _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
                                                                                            ^~~~~~~
  squirrel/squirrel/sqobject.h:131:25: note: expanded from macro 'type'
  #define type(obj) ((obj)._type)
                     ~~~~~^~~~~~

  PR:		222402
  Submitted by:	chardon.frederic@gmail.com
  Reported by:	pkg-fallout

Changes:
  head/games/simutrans/files/patch-squirrel_squirrel_sqvm.cpp
Comment 2 Jan Beich freebsd_committer freebsd_triage 2017-09-21 23:28:43 UTC
Thanks. Landed.