Re: Updated fsx.c program (fixed fallocate)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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__)
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux