[Libreoffice] [REVIEW][PATCH] fix GNU/kFreeBSD build

Rene Engelhard rene at debian.org
Mon Jul 25 06:17:59 PDT 2011


Hi,

3.4.x got a#include <sys/prctl.h> in sal which isn't available
on (k9FreeBSD - the GNU/kFreeBSD port is mostly using LINUX though :-)

Fix:

--- sal/osl/unx/thread.c-old	2011-07-22 00:16:33.000000000 +0200
+++ sal/osl/unx/thread.c	2011-07-22 00:17:41.000000000 +0200
@@ -37,7 +37,7 @@
 #include <rtl/textenc.h>
 #include <sal/macros.h>
 
-#if defined LINUX
+#if defined LINUX && ! defined __FreeBSD_kernel__
 #include <sys/prctl.h>
 #ifndef PR_SET_NAME
 #define PR_SET_NAME 15
@@ -598,7 +598,7 @@
 }
 
 void SAL_CALL osl_setThreadName(char const * name) {
-#if defined LINUX
+#if defined LINUX && ! defined __FreeBSD_kernel__
     if (prctl(PR_SET_NAME, (unsigned long) name, 0, 0, 0) != 0) {
         OSL_TRACE(
             "%s prctl(PR_SET_NAME) failed with errno %d", OSL_LOG_PREFIX,

OK for -3-4?

Grüße/Regards,

René
-- 
 .''`.  René Engelhard -- Debian GNU/Linux Developer
 : :' : http://www.debian.org | http://people.debian.org/~rene/
 `. `'  rene at debian.org | GnuPG-Key ID: D03E3E70
   `-   Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70


More information about the LibreOffice mailing list