summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-05-20 15:02:03 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-05-20 15:02:03 +0900
commit2e838250a458870cb725d4df58eeebb73bb34f24 (patch)
treee831b37292d7b3a9868fa37994ce6178de327d9d
parent505c6961dc5aa75783c43bb582379582cae0dbbb (diff)
parent486870e353e1d06cb2592963c1a021231eec9c5b (diff)
downloadmruby-2e838250a458870cb725d4df58eeebb73bb34f24.tar.gz
mruby-2e838250a458870cb725d4df58eeebb73bb34f24.zip
Merge pull request #2798 from iij/pr-netbsd
Fix build mruby for NetBSD
-rw-r--r--mrbgems/mruby-bin-mirb/mrbgem.rake6
-rw-r--r--src/fmt_fp.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-mirb/mrbgem.rake b/mrbgems/mruby-bin-mirb/mrbgem.rake
index 6ddd97203..98df38499 100644
--- a/mrbgems/mruby-bin-mirb/mrbgem.rake
+++ b/mrbgems/mruby-bin-mirb/mrbgem.rake
@@ -12,7 +12,11 @@ MRuby::Gem::Specification.new('mruby-bin-mirb') do |spec|
spec.linker.libraries << 'termcap'
end
end
- spec.linker.libraries << 'readline'
+ if RUBY_PLATFORM.include?('netbsd')
+ spec.linker.libraries << 'edit'
+ else
+ spec.linker.libraries << 'readline'
+ end
elsif spec.build.cc.search_header_path 'linenoise.h'
spec.cc.defines << "ENABLE_LINENOISE"
end
diff --git a/src/fmt_fp.c b/src/fmt_fp.c
index 9aeae642c..ef2f19dd5 100644
--- a/src/fmt_fp.c
+++ b/src/fmt_fp.c
@@ -90,7 +90,7 @@ fmt_u(uint32_t x, char *s)
typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double)];
#endif
-#if defined(__CYGWIN32__) || defined(mips)
+#if defined(__CYGWIN32__) || defined(__NetBSD__) || defined(mips)
static long double
frexpl (long double x, int *eptr)
{