sw/source/uibase/config/usrpref.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit ac1600f9d13f6aa66b635ed5c48bc8d26ec83f6f
Author:     Rico Tzschichholz <ric...@ubuntu.com>
AuthorDate: Wed Sep 4 11:56:08 2024 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu Sep 5 18:39:41 2024 +0200

    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.st...@allotropia.de>
    (cherry picked from commit f20592f7baf1b07f1b60c1625e69cee6e2e9be88)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172891

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;

Reply via email to