pkgsrc-Users archive

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

Re: [patch] net/rtorrent default option xmlrpc option fails



Ok, summarizing: with the following 2 patches to net/libtorrent, things
should build. I quickly ran it in my pkg_comp environment but that isn't
really a use test.

$NetBSD$

--- src/protocol/request_list.cc.orig	2015-08-08 15:01:49.000000000 +0000
+++ src/protocol/request_list.cc
@@ -51,6 +51,7 @@
 #include "request_list.h"
 
 namespace torrent {
+  const int request_list_constants::bucket_count;
 
 const instrumentation_enum request_list_constants::instrumentation_added[bucket_count] = {
   INSTRUMENTATION_TRANSFER_REQUESTS_QUEUED_ADDED,

$NetBSD$

--- src/torrent/poll_kqueue.cc.orig	2015-08-08 15:01:32.000000000 +0000
+++ src/torrent/poll_kqueue.cc
@@ -111,7 +111,7 @@ PollKQueue::modify(Event* event, unsigne
   struct kevent* itr = m_changes + (m_changedEvents++);
 
   assert(event == m_table[event->file_descriptor()].second);
-  EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, event);
+  EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, (intptr_t)event);
 }
 
 PollKQueue*
@@ -309,11 +309,11 @@ PollKQueue::close(Event* event) {
 
   // Shouldn't be needed anymore.
   for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr)
-    if (itr->udata == event)
+    if (itr->udata == (intptr_t)event)
       itr->udata = NULL;
 
   m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents,
-                                   rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
+                                   rak::equal((intptr_t)event, rak::mem_ref(&kevent::udata))) - m_changes;
 }
 
 void
@@ -335,11 +335,11 @@ PollKQueue::closed(Event* event) {
 
   // Shouldn't be needed anymore.
   for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr)
-    if (itr->udata == event)
+    if (itr->udata == (intptr_t)event)
       itr->udata = NULL;
 
   m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents,
-                                   rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes;
+                                   rak::equal((intptr_t)event, rak::mem_ref(&kevent::udata))) - m_changes;
 }
 
 // Use custom defines for EPOLL* to make the below code compile with

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/falu.nl      -- are condemned to reinvent it. Poorly.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index