Package: serf
Version: 0.3.0-0.2
Severity: important
Tags: patch
User: [email protected]
Usertags: kfreebsd

serf fails to build from source on GNU/kFreeBSD due to failures in the
testsuite. They are due to the assumptions on the returned events that
are not true with the FreeBSD kernel.

Please find below a patch to fix the problem, it has already been sent
upstream. It would be nice if you can fix the problem soon, as it is
currently blocking a lot of packages on GNU/kFreeBSD. Thanks in advance.


Patch sent upstream, issue #51.

--- a/test/test_util.c
+++ b/test/test_util.c
@@ -168,6 +168,7 @@
     apr_pollset_t *pollset;
     apr_int32_t num;
     const apr_pollfd_t *desc;
+    int client_sock_handled = 0;
 
     /* create a new pollset */
     status = apr_pollset_create(&pollset, 32, pool, 0);
@@ -211,7 +212,14 @@
             goto cleanup;
         }
 
-        if (desc->desc.s == tb->client_sock) {
+        if (desc->desc.s == tb->client_sock && !client_sock_handled) {
+            /* Note: on some implementations (for example with kqueue),
+               apr_pollset_poll() returns separate events for APR_POLLIN
+               and APR_POLLOUT. client_sock_handled filters the second 
+               event.
+            */
+            client_sock_handled = 1;
+
             /* Replay data to socket. */
             status = replay(tb, pool);
 

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 7.2-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to