Aleksandar Simic <[email protected]> wrote: > Hello, > > the same OS & ruby version as the original poster who reported the > issue. I see the same symptoms. > > Cowboy fix: adding "-D__BSD_VISIBLE" to CPPFLAGS gets raindrops gem to build. > > Easily accessible and viewable sys/mmap.h: > > http://www.gitorious.net/freebsd/freebsd/blobs/HEAD/sys/sys/mman.h
Aha! So defining _XOPEN_SOURCE appears to cause __BSD_VISIBLE to not be defined in sys/cdefs.h. I've pushed out the below patch to git://bogomips.org/raindrops.git > If required, I can give you access to my FreeBSD machine, just let me know. If the below patch doesn't fix it, yes, it'd be greatly appreciated, thanks! >From 1e7dc89cc38c5dec0b63ac452b23141297701f88 Mon Sep 17 00:00:00 2001 From: Eric Wong <[email protected]> Date: Fri, 24 Jun 2011 17:06:56 -0700 Subject: [PATCH] remove _XOPEN_SOURCE #define for FreeBSD This appears to cause __BSD_VISIBLE to not be defined, which is required for MAP_ANON to be visible in sys/mman.h Thanks for Aleksandar Simic for the hint and Troex Nevelin for the bug report! --- ext/raindrops/extconf.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ext/raindrops/extconf.rb b/ext/raindrops/extconf.rb index 825625d..9f5de95 100644 --- a/ext/raindrops/extconf.rb +++ b/ext/raindrops/extconf.rb @@ -7,7 +7,7 @@ have_func('munmap', 'sys/mman.h') or abort 'munmap() not found' $CPPFLAGS += " -D_GNU_SOURCE " have_func('mremap', 'sys/mman.h') -$CPPFLAGS += " -D_BSD_SOURCE -D_XOPEN_SOURCE=600 " +$CPPFLAGS += " -D_BSD_SOURCE " have_func("getpagesize", "unistd.h") have_func('rb_thread_blocking_region') have_func('rb_thread_io_blocking_region') -- Eric Wong _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
