LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-31-2014, 11:32 PM   #1
mohammad taqy bayat
LQ Newbie
 
Registered: Aug 2014
Posts: 16

Rep: Reputation: Disabled
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 07:46 PM.
 
Old 09-02-2014, 08:18 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Code:
open(c_file,PUT__CRT_FLAG,DEF_FILE_ACCE,c_mode)
probably should be

Code:
open(c_file,PUT__CRT_FLAG|DEF_FILE_ACCE,c_mode)
and maybe you're compiling something nobody ever tested.
 
  


Reply

Tags
c++, open


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding new system call (error) n.a.s Linux - Kernel 3 05-01-2014 06:57 AM
kernel error and call trace archdave Slackware 0 02-17-2009 01:45 AM
What is the system call of getting the terminal attribute? henry0712 Programming 2 01-02-2007 12:06 PM
NETPERF: ERROR --> send_udp_stream: error on remote: Interrupted system call dravya Linux - General 1 05-29-2004 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration