lib/replace: work around an API conflict between ncurses and XFS xattr API
authorRalph Boehme <slow@samba.org>
Thu, 12 Dec 2019 09:46:21 +0000 (10:46 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 12 Dec 2019 20:22:51 +0000 (20:22 +0000)
commit48ed60d7fd0b567c2450020b8ccaa2c6ff8913e3
treef95f57ba0d3d6a76a246d877a2749d272dafc7dc
parent82aff583b7f7e018ad4a1db92dc635df8e5ebe7b
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 <sys|attr/attributes.h> if <attr|sys/xattr.h> is present.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Dec 12 20:22:51 UTC 2019 on sn-devel-184
lib/replace/system/filesys.h