sleepy_penguin RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: sleepy.penguin@librelist.org
Subject: [sleepy.penguin] [PATCH 3/3] init: avoid redefinition warning for _GNU_SOURCE
Date: Thu, 26 Sep 2013 21:40:00 +0000	[thread overview]
Message-ID: <1380231600-27298-3-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: 1380231600-27298-1-git-send-email-normalperson@yhbt.net

This is already defined for most (if not all) Rubies when ruby.h
is included.
---
 ext/sleepy_penguin/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ext/sleepy_penguin/init.c b/ext/sleepy_penguin/init.c
index 9b4f31c..90eddbd 100644
--- a/ext/sleepy_penguin/init.c
+++ b/ext/sleepy_penguin/init.c
@@ -1,5 +1,8 @@
-#define _GNU_SOURCE
 #include <ruby.h>
+#ifndef _GNU_SOURCE
+#  define _GNU_SOURCE /* TODO: confirm this is needed */
+#endif
+
 #include <unistd.h>
 #include <sys/types.h>
 #include "git_version.h"
-- 
1.8.4



      parent reply	other threads:[~2013-09-26 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26 21:39 [sleepy.penguin] [PATCH 1/3] test_epoll: minor compatibility fix for Ruby 2.1.0 Eric Wong
2013-09-26 21:39 ` [sleepy.penguin] [PATCH 2/3] avoid RARRAY_PTR usage for Linux-only bits Eric Wong
2013-09-26 21:40 ` Eric Wong [this message]

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/sleepy_penguin/

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

  git send-email \
    --in-reply-to=1380231600-27298-3-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=sleepy.penguin@librelist.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/sleepy_penguin.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).