Build of setools fails with "unresolved overloaded function type": replcon.cc: In function ‘int replcon_lsetfilecon(const char*, security_context_t)’: replcon.cc:73:25: warning: NULL used in arithmetic [-Wpointer-arith] replcon.cc:73:25: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘long int’ to binary ‘operator!=’ Reproducible: Always
Created attachment 376324 [details] setools build.log
Created attachment 376334 [details, diff] call lsetfilecon_raw directly Try placing this patch in /etc/portage/patches/app-admin/setools-3.3.8-r4/ and rebuild setools. The build failure itself should be resolved, but I need to do some more testing to make sure it doesn't break things (this is wrt weak symbols so I need to find the right code-path to test it out).
Difference between libselinux 2.2.2 and 2.3 contains: --- include/selinux/selinux.h +++ include/selinux/selinux.h ... /* Set file context */ -extern int setfilecon(const char *path, security_context_t con); -extern int setfilecon_raw(const char *path, security_context_t con); -extern int lsetfilecon(const char *path, security_context_t con); -extern int lsetfilecon_raw(const char *path, security_context_t con); -extern int fsetfilecon(int fd, security_context_t con); -extern int fsetfilecon_raw(int fd, security_context_t con); +extern int setfilecon(const char *path, const char * con); +extern int setfilecon_raw(const char *path, const char * con); +extern int lsetfilecon(const char *path, const char * con); +extern int lsetfilecon_raw(const char *path, const char * con); +extern int fsetfilecon(int fd, const char * con); +extern int fsetfilecon_raw(int fd, const char * con); This means that this change could be applied in setools: --- secmds/replcon.cc +++ secmds/replcon.cc @@ -63 +63 @@ -extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak)); +extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak));
setools-3.3.8-r5 has Arfrever's patch (+ update on the dependency to depend on >=sys-libs/libselinux-2.3).
Stabilized