* O_DIRECT not found.
@ 2010-04-01 16:15 Fabio Giovagnini
2010-04-02 2:35 ` Conrad Parker
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Giovagnini @ 2010-04-01 16:15 UTC (permalink / raw)
To: linux-sh
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h> /* Standard input/output definitions */
#include <string.h> /* String function definitions */
#include <unistd.h> /* UNIX standard function definitions */
#include <fcntl.h> /* File control definitions */
#include <errno.h> /* Error number definitions */
#include <termios.h>
.
.
.
rs485TxEn_fd = open("/proc/mlcdports/rs485txen",O_WRONLY | O_NDELAY |
O_DIRECT);
.
.
.
Why I cannot find the flag O_DIRECT
Thanks a lot
--
Fabio Giovagnini
Aurion s.r.l.
P.I e C.F.
00885711200
Tel. +39.051.594.78.24
Cell. +39.335.83.50.919
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: O_DIRECT not found.
2010-04-01 16:15 O_DIRECT not found Fabio Giovagnini
@ 2010-04-02 2:35 ` Conrad Parker
0 siblings, 0 replies; 2+ messages in thread
From: Conrad Parker @ 2010-04-02 2:35 UTC (permalink / raw)
To: linux-sh
On 2 April 2010 01:15, Fabio Giovagnini
<fabio.giovagnini@aurion-tech.com> wrote:
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <stdio.h> /* Standard input/output definitions */
> #include <string.h> /* String function definitions */
> #include <unistd.h> /* UNIX standard function definitions */
> #include <fcntl.h> /* File control definitions */
> #include <errno.h> /* Error number definitions */
> #include <termios.h>
>
> .
> .
> .
>
>
>
> rs485TxEn_fd = open("/proc/mlcdports/rs485txen",O_WRONLY | O_NDELAY |
> O_DIRECT);
>
> .
> .
> .
>
> Why I cannot find the flag O_DIRECT
You'd need to #define _GNU_SOURCE before including <fcntl.h>
from open(2):
O_DIRECT is not specified in POSIX; one has to define _GNU_SOURCE to get
its definition.
Conrad.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-02 2:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01 16:15 O_DIRECT not found Fabio Giovagnini
2010-04-02 2:35 ` Conrad Parker
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).