From: Christian Kujau <christian.kujau@oracle.com>
To: linux-btrfs@vger.kernel.org, chris.mason@oracle.com
Cc: zhaolei@cn.fujitsu.com, miaox@cn.fujitsu.com
Subject: Re: implicit declaration of function 'strndup'
Date: Fri, 14 May 2010 06:27:28 -0700 [thread overview]
Message-ID: <4BED4FC0.1000004@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.01.1004220040350.18247@bogon.housecafe.de>
Hi,
I've sent this (see below) a while ago, the patch from Miao Xie is from
March even. I still cannot compile btrfs-progs without his fix. Please
include this fix into the repo.
Thanks,
Christian.
Christian Kujau wrote on 2010-04-22 24:50 :
> compiling the latest checkout of btrfs-progs-git, I still get the compiler
> error Miao Xie reported[0] in March, along with a patch:
>
> cc1: warnings being treated as errors
> btrfs-list.c: In function 'ino_resolve':
> btrfs-list.c:511: warning: implicit declaration of function 'strndup'
> btrfs-list.c:511: warning: incompatible implicit declaration of built-in
> function 'strndup'
> make: *** [btrfs-list.o] Error 1
>
> I'm on Debian/stable (gcc 4.3.2-1.1, glibc-2.7), the patch from Miao Xie
> resolved this issue. Is there a reason it's not in git yet?
>
> Thanks,
> Christian.
>
> [0] https://patchwork.kernel.org/patch/88224/
> http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg04610.html
diff --git a/btrfs-list.c b/btrfs-list.c
index 7741705..9dedb5d 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -16,6 +16,7 @@
* Boston, MA 021110-1307, USA.
*/
+#define _GNU_SOURCE
#ifndef __CHECKER__
#include <sys/ioctl.h>
#include <sys/mount.h>
diff --git a/btrfs.c b/btrfs.c
index ab5e57f..46314cf 100644
--- a/btrfs.c
+++ b/btrfs.c
@@ -14,7 +14,7 @@
* Boston, MA 021110-1307, USA.
*/
-
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
next prev parent reply other threads:[~2010-05-14 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 7:50 implicit declaration of function 'strndup' Christian Kujau
2010-05-14 13:27 ` Christian Kujau [this message]
2010-05-19 12:29 ` Christian Kujau
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=4BED4FC0.1000004@oracle.com \
--to=christian.kujau@oracle.com \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@nerdbynature.de \
--cc=miaox@cn.fujitsu.com \
--cc=zhaolei@cn.fujitsu.com \
/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;
as well as URLs for NNTP newsgroup(s).