summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2024-09-04 11:56:08 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-09-05 10:50:31 +0200
commitf20592f7baf1b07f1b60c1625e69cee6e2e9be88 (patch)
treec1f39d7957bf6729c6999d840203d7a6302eddb2
parent0a54d028fa8047b0c396fa182b7f3af5be660598 (diff)
sw: Add missing #include <cstring>
/<<PKGBUILDDIR>>/sw/source/uibase/config/usrpref.cxx: In member function ‘com::sun::star::uno::Sequence<rtl::OUString> SwContentViewConfig::GetPropertyNames() const’: /<<PKGBUILDDIR>>/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 /<<PKGBUILDDIR>>/include/rtl/string.hxx:36, from /<<PKGBUILDDIR>>/include/rtl/ustring.hxx:45, from /<<PKGBUILDDIR>>/include/com/sun/star/uno/Any.h:30, from /<<PKGBUILDDIR>>/include/com/sun/star/uno/Any.hxx:35, from /<<PKGBUILDDIR>>/include/o3tl/any.hxx:21, from /<<PKGBUILDDIR>>/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) | ^~~~~~ /<<PKGBUILDDIR>>/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]: *** [/<<PKGBUILDDIR>>/solenv/gbuild/LinkTarget.mk:338: /<<PKGBUILDDIR>>/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 <michael.stahl@allotropia.de>
-rw-r--r--sw/source/uibase/config/usrpref.cxx4
1 files changed, 4 insertions, 0 deletions
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 <com/sun/star/uno/Sequence.hxx>
#include <unotools/localedatawrapper.hxx>
+#if defined(__GNUC__) && !defined(__clang__)
+#include <cstring>
+#endif
+
using namespace utl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;