From: "Samuli Suominen (ssuominen)" <ssuominen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in net-irc/telepathy-idle/files: telepathy-idle-0.1.2-glibc-2.10.patch
Date: Fri, 07 Aug 2009 12:29:43 +0000 [thread overview]
Message-ID: <E1MZOZr-0003id-4W@stork.gentoo.org> (raw)
ssuominen 09/08/07 12:29:43
Added: telepathy-idle-0.1.2-glibc-2.10.patch
Log:
Fix building with GLIBC 2.10+ wrt #271640.
(Portage version: 2.2_rc36/cvs/Linux x86_64)
Revision Changes Path
1.1 net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/telepathy-idle/files/telepathy-idle-0.1.2-glibc-2.10.patch?rev=1.1&content-type=text/plain
Index: telepathy-idle-0.1.2-glibc-2.10.patch
===================================================================
From 1380db9f7a3feab144452f990b79728c9f2e3dbf Mon Sep 17 00:00:00 2001
From: Will Thompson <will.thompson@collabora.co.uk>
Date: Sat, 20 Jun 2009 18:22:15 +0100
Subject: [PATCH] Define _GNU_SOURCE not __USE_GNU to get strnlen(3).
__USE_GNU is a glibc-internal macro that we should not be using; this
was causing a build failure in openSUSE, which has a glibc from the
future.
idle-connection.c doesn't actually use strnlen.
Based on a patch by Vincent Untz, which didn't compile for me: it seemed
like string.h was getting #included before the #define, and thus strnlen
wasn't exposed. Making the #define the first thing in idle-parser.c
fixed this.
---
src/idle-connection.c | 2 --
src/idle-parser.c | 5 +++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/idle-connection.c b/src/idle-connection.c
index 7080ae3..10613b4 100644
--- a/src/idle-connection.c
+++ b/src/idle-connection.c
@@ -22,8 +22,6 @@
#include <config.h>
-/* strnlen */
-#define __USE_GNU
#include <string.h>
#include <time.h>
diff --git a/src/idle-parser.c b/src/idle-parser.c
index b5d561a..93c330d 100644
--- a/src/idle-parser.c
+++ b/src/idle-parser.c
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+/* For strnlen(), which is a GNU extension. */
+#define _GNU_SOURCE
+
#include "idle-parser.h"
#include "idle-connection.h"
@@ -26,9 +29,7 @@
#include <glib.h>
#include <glib-object.h>
-#define __USE_GNU
#include <string.h>
-#undef __USE_GNU
#include <stdio.h>
#define IDLE_DEBUG_FLAG IDLE_DEBUG_PARSER
--
1.6.3.1
next reply other threads:[~2009-08-07 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 12:29 Samuli Suominen (ssuominen) [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-09-27 18:11 [gentoo-commits] gentoo-x86 commit in net-irc/telepathy-idle/files: telepathy-idle-0.1.2-glibc-2.10.patch Olivier Crete (tester)
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1MZOZr-0003id-4W@stork.gentoo.org \
--to=ssuominen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox