unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: [PATCH] replace fchmod()-based heartbeat with raindrops
Date: Fri, 24 Jun 2011 17:15:34 -0700	[thread overview]
Message-ID: <20110625001534.GA18193@dcvr.yhbt.net> (raw)
In-Reply-To: <BANLkTinV+8uE80CpubvzgJp_6-+RETSvRg@mail.gmail.com>

Aleksandar Simic <asimic@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
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 <normalperson@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
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 - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


  reply	other threads:[~2011-06-25  0:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 23:25 [PATCH] replace fchmod()-based heartbeat with raindrops Eric Wong
2011-06-24 17:30 ` Eric Wong
2011-06-24 18:17   ` Jeremy Evans
2011-06-24 20:51     ` Eric Wong
2011-06-24 22:50       ` Aleksandar Simic
2011-06-25  0:15         ` Eric Wong [this message]
2011-06-26  5:36           ` Aleksandar Simic
2011-06-27  7:32             ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110625001534.GA18193@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).