[PATCH] replace fchmod()-based heartbeat with raindrops

Eric Wong normalperson at yhbt.net
Fri Jun 24 20:15:34 EDT 2011

Aleksandar Simic <asimic at gmail.com> 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

> 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,

>From 1e7dc89cc38c5dec0b63ac452b23141297701f88 Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson at yhbt.net>
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

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'
 have_func('mremap', 'sys/mman.h')
 have_func("getpagesize", "unistd.h")
Eric Wong

More information about the mongrel-unicorn mailing list