From: Ralph Boehme Date: Thu, 12 Dec 2019 09:46:21 +0000 (+0100) Subject: lib/replace: work around an API conflict between ncurses and XFS xattr API X-Git-Tag: ldb-2.1.0~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48ed60d7fd0b567c2450020b8ccaa2c6ff8913e3;p=thirdparty%2Fsamba.git lib/replace: work around an API conflict between ncurses and XFS xattr API Compile error: [4530/4693] Compiling source3/utils/regedit_list.c In file included from ../../source3/utils/regedit_list.h:24, from ../../source3/utils/regedit_list.c:20: /usr/include/curses.h:611:28: error: conflicting types for ‘attr_get’ 611 | extern NCURSES_EXPORT(int) attr_get (attr_t *, NCURSES_PAIRS_T *, void *); /* generated */ | ^~~~~~~~ compilation terminated due to -Wfatal-errors. Both ncurses and XFS xattr API provide a get_attr() function. As a workaround avoid including if is present. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu Dec 12 20:22:51 UTC 2019 on sn-devel-184 --- diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h index 1a8cb68103d..afde4eacb39 100644 --- a/lib/replace/system/filesys.h +++ b/lib/replace/system/filesys.h @@ -107,17 +107,15 @@ #include #endif -#if defined(HAVE_SYS_ATTRIBUTES_H) -#include -#elif defined(HAVE_ATTR_ATTRIBUTES_H) -#include -#endif - /* mutually exclusive (SuSE 8.2) */ #if defined(HAVE_ATTR_XATTR_H) #include #elif defined(HAVE_SYS_XATTR_H) #include +#elif defined(HAVE_SYS_ATTRIBUTES_H) +#include +#elif defined(HAVE_ATTR_ATTRIBUTES_H) +#include #endif #ifdef HAVE_SYS_EA_H