error: call to ‘__open_too_many_args’ declared with attribute error: open can be call
Hi there,
While compiling a makefile on ubuntu 12.04 LTS (64-bit) encountered with this error:
gcc -c -O -DLinux -I /usr/include/readline -I ./inc f_evt.c
In file included from /usr/include/fcntl.h:252:0,
from ./inc/f_evt.h:10,
from f_evt.c:43:
In function ‘open’,
inlined from ‘f_evt_put_open’ at f_evt.c:738:37:
/usr/include/x86_64-linux-gnu/bits/fcntl2.h:45:26: error: call to ‘__open_too_many_args’ declared with attribute error: open can be called either with 2 or 3 arguments, not more
make: *** [f_evt.o] Error 1
in these lines:
f_evt.h : 10 : #include <fcntl.h>
f_evt.c : 43 : #include "f_evt.h"
f_evt.c: 738: if((ps_chan->l_channel_no=open(c_file,PUT__CRT_FLAG,DEF_FILE_ACCE,c_mode) )== -1)
with the following declarations:
CHARS c_file[80];
#define PUT__OPEN_APD_FLAG O_RDWR|O_APPEND
#define DEF_FILE_ACCE S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH /* rw-r--r-- */
#define PUT__CRT_FLAG O_CREAT|O_RDWR
CHARS c_mode[80];
How do I fix it?
Last edited by mohammad taqy bayat; 09-04-2014 at 08:46 PM.
|