sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.86k stars 128 forks source link

CheckFunc doesn't give correct result due to "error: too few arguments to function" #604

Closed alexfanqi closed 1 year ago

alexfanqi commented 1 year ago
env = Environment()
conf = Configure(env)
conf.CheckFunc(
            'getxattr',
            header=
                '#include <sys/types.h>\n#include <sys/xattr.h>'
        )
# doesn't have to be getxattr. It is just I discovered this issue from this code

producing a config.log

...
gcc -o .sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.o -c .sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c
.sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c: In function 'main':
.sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c:15:3: error: too few arguments to function 'getxattr'
   15 |   getxattr();
      |   ^~~~~~~~
In file included from .sconf_temp/conftest_c10cc6ce1defa319be0b1e0d1eeface9_0.c:5:
/usr/include/sys/xattr.h:60:16: note: declared here
   60 | extern ssize_t getxattr (const char *__path, const char *__name,
      |                ^~~~~~~~
scons: Configure: no
alexfanqi commented 1 year ago

sorry, wrong place