Bug 222402 - games/simutrans: Fix build on -CURRENT after llvm 5.x import
Summary: games/simutrans: Fix build on -CURRENT after llvm 5.x import
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-09-17 13:37 UTC by chardon.frederic
Modified: 2017-09-21 23:28 UTC (History)
0 users

See Also:


Attachments
move math.h before the definition of the type() macro (294 bytes, patch)
2017-09-17 13:37 UTC, chardon.frederic
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.