Menu ▾ ▴

#1 open bug

open
nobody
None
5
2010-04-11
2010-04-11
No

Hi, i am working in EVIlib and i found that in the last GCC "4.3 i think" in ubuntu 9.10 the library have the error:

/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments

is a small bug in your code y just simply add to a open function in ELIb.c++ in line 537
from:

_port = open(portname, O_CREAT | O_RDWR| O_NOCTTY );
to:

_port = open(portname, O_CREAT | O_RDWR| O_NOCTTY ,0644);

is because when you use O_CREAT you need to use this 3 parameter see this link
http://opengroup.org/onlinepubs/007908799/xsh/open.html
i use 644 but if you like you can use any other flag

Discussion


Log in to post a comment.