Ticket #8278: rtorrent.patch

File rtorrent.patch, 3.0 KB (added by sav, 7 years ago)

Update rtorrent to 0.8.7 r1189

  • Makefile

    diff -durN rtorrent.old/Makefile rtorrent/Makefile
    old new  
    99include $(TOPDIR)/rules.mk 
    1010 
    1111PKG_NAME:=rtorrent 
    12 PKG_REV:=1165 
    13 PKG_VERSION:=0.8.6_r$(PKG_REV) 
     12PKG_REV:=1189 
     13PKG_VERSION:=0.8.7_r$(PKG_REV) 
    1414PKG_RELEASE:=1 
    1515 
    1616PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     
    4040 based clients in an ncurses client. 
    4141endef 
    4242 
    43 ifneq ($(CONFIG_GCC_VERSION_3_4)$(CONFIG_GCC_VERSION_4_1),) 
     43ifneq ($(CONFIG_GCC_VERSION_4_1),) 
    4444TARGET_CPPFLAGS += -fno-strict-aliasing 
    4545endif 
    4646 
    47 TARGET_LDFLAGS += -lpthread 
    48  
    4947CONFIGURE_ARGS+= \ 
    5048        --enable-shared \ 
    5149        --disable-static \ 
    5250        --disable-debug \ 
     51        --disable-werror \ 
    5352        --with-xmlrpc-c \ 
     53        --without-kqueue \ 
    5454 
    5555define Build/Configure 
    5656        (cd $(PKG_BUILD_DIR); ./autogen.sh ); 
  • patches/110-fix-no-posix_memalign.diff

    diff -durN rtorrent.old/patches/110-fix-no-posix_memalign.diff rtorrent/patches/110-fix-no-posix_memalign.diff
    old new  
    88 #include <sys/types.h> 
    99  
    1010 namespace rak { 
    11 @@ -74,17 +75,13 @@ public: 
     11@@ -74,17 +75,13 @@ 
    1212   size_type max_size () const throw() { return std::numeric_limits<size_t>::max() / sizeof(T); } 
    1313  
    1414   pointer allocate(size_type num, const_void_pointer hint = 0) { return alloc_size(num*sizeof(T)); } 
    15 +  void deallocate (pointer p, size_type num) { dealloc_size(p, num*sizeof(T)); } 
    16   
     15- 
    1716-  static pointer alloc_size(size_type size) { 
    1817-    pointer ptr = NULL; 
    1918-    int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size); 
    2019- 
    2120-    return ptr; 
    2221-  } 
     22+  void deallocate (pointer p, size_type num) { dealloc_size(p, num*sizeof(T)); } 
     23 
    2324+  static pointer alloc_size(size_type size); 
    2425+  static void dealloc_size(pointer p, size_type size); 
    2526  
    2627   void construct (pointer p, const T& value) { new((void*)p)T(value); } 
    2728   void destroy (pointer p) { p->~T(); } 
    28 -  void deallocate (pointer p, size_type num) { ::operator delete((void*)p); } 
     29-  void deallocate (pointer p, size_type num) { free((void*)p); } 
    2930 }; 
    3031  
    3132  
    32 @@ -98,6 +95,36 @@ bool operator!= (const cacheline_allocat 
     33@@ -98,6 +95,36 @@ 
    3334   return false; 
    3435 } 
    3536  
  • patches/120-scgi_task_free.patch

    diff -durN rtorrent.old/patches/120-scgi_task_free.patch rtorrent/patches/120-scgi_task_free.patch
    old new  
     1--- a/src/rpc/scgi_task.cc.orig 2010-01-25 16:14:09.000000000 +0300 
     2+++ b/src/rpc/scgi_task.cc      2010-09-16 10:42:06.000000000 +0400 
     3@@ -64,7 +64,7 @@ 
     4   char* tmp = rak::cacheline_allocator<char>::alloc_size(size); 
     5  
     6   std::memcpy(tmp, buffer, bufferSize); 
     7-  delete [] m_buffer; 
     8+  free (m_buffer); 
     9   m_buffer = tmp; 
     10 } 
     11  
     12@@ -96,7 +96,7 @@ 
     13   get_fd().close(); 
     14   get_fd().clear(); 
     15  
     16-  delete [] m_buffer; 
     17+  free (m_buffer); 
     18   m_buffer = NULL; 
     19  
     20   // Test