[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

open() is buggy in recent glibc (was: Koji cannot build openldap)



Jakub Jelinek <jakub redhat com> writes:

> It includes <fcntl.h>, which provides open, and POSIX allows
> functions to be defined as function-like macros.  Until recently
> glibc didn't define open as a function like macro, but in glibc
> 2.6.90 and later it does when -D_FORTIFY_SOURCE=2, to enforce
> correct use of open/open64/openat/openat64.

New code seems to be buggy and fails at legitimate use of open()

|  fd = open(file, O_RDONLY);

with

| src/vlimit.c: In function 'readFile':
| src/vlimit.c:280: warning: ISO C forbids empty initializer braces
| src/vlimit.c:280: error: zero or negative size array '___arr'
| src/vlimit.c:280: warning: ISO C forbids zero-size array '__open_too_many_args'
| src/vlimit.c:280: warning: ISO C forbids braced-groups within expressions

http://koji.fedoraproject.org/koji/getfile?taskID=88648&name=build.log


Beside the error, it clutters the build with bogus 'ISO C forbids ...' 
warnings.



Enrico

Attachment: pgpE9drc4Qo0t.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]