Permalink
Browse files

Updating compiler flags for building on OpenIndiana

  • Loading branch information...
mattconnolly committed Apr 16, 2012
1 parent 59d50de commit 26c85d592be342b278443cf22d7998767e61da3f
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/phusion_passenger/platform_info/compiler.rb
@@ -143,9 +143,14 @@ def self.portability_cflags
if RUBY_PLATFORM =~ /solaris/
flags << '-pthreads'
- flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
- flags << '-DBOOST_HAS_STDINT_H' unless RUBY_PLATFORM =~ /solaris2.9/
- flags << '-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED' if RUBY_PLATFORM =~ /solaris2.9/
+ if RUBY_PLATFORM =~ /solaris2.11/
+ # skip the _XOPEN_SOURCE and _XPG4_2 definitions in later versions of Solaris / OpenIndiana
+ flags << '-DHAS_ALLOCA_H_ -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
+ else
+ flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'
+ flags << '-DBOOST_HAS_STDINT_H' unless RUBY_PLATFORM =~ /solaris2.9/
+ flags << '-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED' if RUBY_PLATFORM =~ /solaris2.9/
+ end
flags << '-mcpu=ultrasparc' if RUBY_PLATFORM =~ /sparc/
elsif RUBY_PLATFORM =~ /openbsd/
flags << '-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'

0 comments on commit 26c85d5

Please sign in to comment.