summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-09 08:34:10 +0200
committerobo <obo@openoffice.org>2010-06-09 08:34:10 +0200
commit7315ce26bc74f3532a34288d5b6cd06f80c0bcc2 (patch)
tree8549dd28897f116ac843e776f40a8fb214cf3482 /sal
parent99ff4b156eae57e51ffef715a6184038df745236 (diff)
parent22e6570cba66c2f6105e902917485c792089e98c (diff)
CWS-TOOLING: integrate CWS kfreebsdport01v2
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file_volume.cxx6
-rw-r--r--sal/osl/unx/system.h5
-rw-r--r--sal/osl/unx/util.c4
-rw-r--r--sal/rtl/source/macro.hxx4
4 files changed, 17 insertions, 2 deletions
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index 543acc5f71c5..cc7f61ec6a8b 100644
--- a/sal/osl/unx/file_volume.cxx
+++ b/sal/osl/unx/file_volume.cxx
@@ -46,6 +46,12 @@
#undef HAVE_STATFS_H
#endif
+#if defined(LINUX) && defined(__FreeBSD_kernel__)
+#undef LINUX
+#define FREEBSD 1
+#endif
+
+
#if defined(SOLARIS)
#include <sys/mnttab.h>
diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h
index 8cb77c9b7fc8..1cb0979490c0 100644
--- a/sal/osl/unx/system.h
+++ b/sal/osl/unx/system.h
@@ -123,6 +123,11 @@
# define NO_PTHREAD_PRIORITY
# define PTHREAD_SIGACTION pthread_sigaction
#endif
+
+# ifndef ETIME
+# define ETIME ETIMEDOUT
+# endif
+
#endif
#ifdef NETBSD
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index f969bfe566ec..5ba04db56021 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -162,7 +162,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
* And now, the real thing: the get address
*/
-#ifdef LINUX
+#ifdef SIOCGIFHWADDR
ret=ioctl(so, SIOCGIFHWADDR, &ifr);
#else
ret=ioctl(so, SIOCGIFADDR, &ifr);
@@ -177,7 +177,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
close(so);
-#ifdef LINUX
+#ifdef SIOCGIFHWADDR
memcpy(hard_addr,ifr.ifr_hwaddr.sa_data,8);
#else
memcpy(hard_addr,ifr.ifr_ifru.ifru_addr.sa_data,8);
diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx
index 50f0d7de924e..3fa0fbe58f42 100644
--- a/sal/rtl/source/macro.hxx
+++ b/sal/rtl/source/macro.hxx
@@ -39,7 +39,11 @@
#elif defined SOLARIS
#define THIS_OS "Solaris"
#elif defined LINUX
+#ifdef __FreeBSD_kernel__
+#define THIS_OS "kFreeBSD"
+#else
#define THIS_OS "Linux"
+#endif
#elif defined MACOSX
#define THIS_OS "MacOSX"
#elif defined NETBSD