[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#520123: kde4libs: FTBFS on GNU/kFreeBSD



Package: kde4libs
Severity: important
Version: 4:4.2.1-2
Tags: patch
User: glibc-bsd-devel@lists.alioth.debian.org
Usertags: kfreebsd

Hi,

the current version fails to build on GNU/kFreeBSD,
please extend 15_kfreebsd_support.diff by attached patch.

IMHO, it would be better to either test only whether
POSIX_FADV_SEQUENTIAL exists or test whether
posix_fadvise(0,0,0,POSIX_FADV_SEQUENTIAL) can be compiled.
Unfortunately I do not speak cmake, so I am unable
to write better variant of ConfigureChecks.cmake compared to
"check_function_exists(posix_fadvise    HAVE_FADVISE)"

The posix_fadvise() is not required part even of IEEE Std 1003.1-2008, see
http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fadvise.html

It would also be nice if you can inform upstream
about this portability issue.


Thanks in advance

                        Petr
--- kde4libs-4.2.1/debian/patches/15_kfreebsd_support.diff
+++ kde4libs-4.2.1/debian/patches/15_kfreebsd_support.diff
@@ -90,3 +90,27 @@
  
      // Determine the mimetype of the file to be retrieved, and emit it.
      // This is mandatory in all slaves (for KRun/BrowserRun to work)
+--- a/kioslave/file/file_unix.cpp
++++ b/kioslave/file/file_unix.cpp
+@@ -129,8 +129,10 @@
+     }
+ 
+ #ifdef HAVE_FADVISE
++#ifdef POSIX_FADV_SEQUENTIAL
+     posix_fadvise(src_fd,0,0,POSIX_FADV_SEQUENTIAL);
+ #endif
++#endif
+     // WABA: Make sure that we keep writing permissions ourselves,
+     // otherwise we can be in for a surprise on NFS.
+     mode_t initialMode;
+@@ -152,8 +154,10 @@
+     }
+ 
+ #ifdef HAVE_FADVISE
++#ifdef POSIX_FADV_SEQUENTIAL
+     posix_fadvise(dest_fd,0,0,POSIX_FADV_SEQUENTIAL);
+ #endif
++#endif
+ 
+ #ifdef HAVE_POSIX_ACL
+     acl = acl_get_fd(src_fd);

Reply to: