From ac1600f9d13f6aa66b635ed5c48bc8d26ec83f6f Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Wed, 4 Sep 2024 11:56:08 +0200 Subject: sw: Add missing #include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /<>/sw/source/uibase/config/usrpref.cxx: In member function ‘com::sun::star::uno::Sequence SwContentViewConfig::GetPropertyNames() const’: /<>/sw/source/uibase/config/usrpref.cxx:120:24: error: ‘strcmp’ is not a member of ‘std’; did you mean ‘strcmp’? 120 | static_assert(std::strcmp("Update/Link", aPropNames[g_UpdateLinkIndex]) == 0); | ^~~~~~ In file included from /<>/include/rtl/string.hxx:36, from /<>/include/rtl/ustring.hxx:45, from /<>/include/com/sun/star/uno/Any.h:30, from /<>/include/com/sun/star/uno/Any.hxx:35, from /<>/include/o3tl/any.hxx:21, from /<>/sw/source/uibase/config/usrpref.cxx:23: /usr/include/string.h:156:12: note: ‘strcmp’ declared here 156 | extern int strcmp (const char *__s1, const char *__s2) | ^~~~~~ /<>/sw/source/uibase/config/usrpref.cxx:121:24: error: ‘strcmp’ is not a member of ‘std’; did you mean ‘strcmp’? 121 | static_assert(std::strcmp("Display/DefaultAnchor", aPropNames[g_DefaultAnchor]) == 0); | ^~~~~~ /usr/include/string.h:156:12: note: ‘strcmp’ declared here 156 | extern int strcmp (const char *__s1, const char *__s2) | ^~~~~~ make[2]: *** [/<>/solenv/gbuild/LinkTarget.mk:338: /<>/workdir/CxxObject/sw/source/uibase/config/usrpref.o] Error 1 Change-Id: Ie6c89500c554e0027d9b14c082baca519a454c10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172860 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit f20592f7baf1b07f1b60c1625e69cee6e2e9be88) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172891 --- sw/source/uibase/config/usrpref.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sw') diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index 4c375f0c513b..d4c1849820d5 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -30,6 +30,10 @@ #include #include +#if defined(__GNUC__) && !defined(__clang__) +#include +#endif + using namespace utl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -- cgit