abrt / satyr

Automatic problem management with anonymous reports
GNU General Public License v2.0
19 stars 23 forks source link

make rpm fails due to too many args to open #311

Closed michalfabik closed 3 years ago

michalfabik commented 3 years ago

This happens in when compiling one of the test binaries under build, i.e. when running make rpm.
Running just the testsuite with make check works fine.
I first noticed this after I'd upgraded to F33.

In file included from /usr/include/fcntl.h:329,
                 from dump_core.c:5:
In function 'open',
    inlined from 'dump_core' at dump_core.c:54:14:
/usr/include/bits/fcntl2.h:44:5: error: call to '__open_too_many_args' declared with attribute error: open can be called either with 2 or 3 arguments, not more
   44 |     __open_too_many_args ();
michalfabik commented 3 years ago

The immediate cause is -D_FORTIFY_SOURCE=2 which causes fcntl.h to inlcude fcntl2.h where the check of __va_arg_pack_len () > 1 succeeds at line 43, given that open usually has more than 1 argument.