O_DIRECT not found.
#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
Signature · 7 lines
Fabio Giovagnini Aurion s.r.l. P.I e C.F. 00885711200 Tel. +39.051.594.78.24 Cell. +39.335.83.50.919
Quoted 15 lines · Fabio Giovagnini
#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>.
.
.
Quoted 8 lines
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.