Re: Compiling O_DIRECT

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

 



On Friday 16 July 2004 17:19, Shesha Sreenivasamurthy wrote:
> Hi,
>    I am having trouble in compiling my program with O_direct option.

After one whole minute of grepping the looking at the header files we 
see that a define is needed to fix the program in this off-topic 
posting.


#define _GNU_SOURCE
> #include <stdio.h>
> #include <fcntl.h>
> int main {
int main() {

>    int dev = open("/dev/sda", O_RDWR | O_DIRECT);
>     close(dev);
> }


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux