linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: nicholas.dokos@hp.com
Cc: Mingming <cmm@us.ibm.com>, Andreas Dilger <adilger@sun.com>,
	linux-ext4@vger.kernel.org, Eric Sandeen <esandeen@redhat.com>,
	Subrata Modak <subrata@linux.vnet.ibm.com>,
	Dave Jones <davej@redhat.com>,
	linux-fsdevel@vger.kernel.org
Subject: Re: Updated fsx.c program (fixed fallocate)
Date: Fri, 02 Oct 2009 22:40:50 -0500	[thread overview]
Message-ID: <4AC6C7C2.8030706@redhat.com> (raw)
In-Reply-To: <8912.1254537626@gamaville.dokosmarshall.org>

Nick Dokos wrote:
> Mingming wrote:
>>> I think that
>>>
>>> #define _GNU_SOURCE
>>>
>>> will pull in the glibc headers' definition rather than doing our own....
>>>
>> Oh? that's sounds good...
>>
>> I tried to replace above with 
>> #define _GNU_SOURCE	1
>>
>> gcc complained O_DIRECT is still not defined. what did I missing?
>>
> 
> 
> ,----
> | #define _GNU_SOURCE 1
> | 
> | #include <fcntl.h>
> `----
> 
> should do it.
> 
> Nick

yep, works for me as long as I define it ahead of any #includes (not 
sure just fcntl is enough, but anyway; just put it at the top).

-Eric

--- fsx.c.orig	2009-10-02 22:40:15.816142278 -0500
+++ fsx.c	2009-10-02 22:40:26.886145268 -0500
@@ -42,6 +42,8 @@
   *
   */

+#define _GNU_SOURCE
+
  #include <sys/types.h>
  #include <sys/stat.h>
  #if defined(_UWIN) || defined(__linux__)

      reply	other threads:[~2009-10-03  3:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090826052505.GA22238@webber.adilger.int>
2009-09-29 21:38 ` Updated fsx.c program Andreas Dilger
2009-09-29 22:39   ` Updated fsx.c program (fixed fallocate) Andreas Dilger
2009-09-30  3:34     ` Eric Sandeen
2009-09-30 15:21     ` Randy Dunlap
2009-09-30 15:32       ` Eric Sandeen
2009-09-30 16:19         ` Dave Jones
2009-09-30 16:47           ` Eric Sandeen
2009-10-02 22:37     ` Mingming
2009-10-02 22:40       ` Eric Sandeen
2009-10-02 23:26         ` Mingming
2009-10-03  2:40           ` Nick Dokos
2009-10-03  3:40             ` Eric Sandeen [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

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

  git send-email \
    --in-reply-to=4AC6C7C2.8030706@redhat.com \
    --to=sandeen@redhat.com \
    --cc=adilger@sun.com \
    --cc=cmm@us.ibm.com \
    --cc=davej@redhat.com \
    --cc=esandeen@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nicholas.dokos@hp.com \
    --cc=subrata@linux.vnet.ibm.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).