pkgsrc-Bugs archive

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

pkg/35356: [patch] net/libtorrent does not build on Solaris



>Number:         35356
>Category:       pkg
>Synopsis:       [patch] net/libtorrent does not build on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 04 00:50:00 +0000 2007
>Originator:     Peter Schuller
>Release:        Solaris nvb54
>Organization:
>Environment:
SunOS hostname 5.11 snv_54 i86pc i386 i86pc

>Description:
The following issues cause build problems on solaris:

* mincore() is not declared in mman.h even with -D__EXTENSIONS__, when using 
_POSIX_C_SOURCE > 2. Instead one has to include <unistd.h>. This breaks the 
configure script trying to detect mincore() signedness.

* Solaris does not have AF_LOCAL, only AF_UNIX.

* madvise() suffers from the same problem as mincore(), except it is not 
declared by unistd.h, or any other header file in /usr/include.

Some related discussion:

* http://libtorrent.rakshasa.no/ticket/757#comment:10
* http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6442434
* http://www.opensolaris.org/jive/thread.jspa?threadID=21035&tstart=0



>How-To-Repeat:

>Fix:
This patch fixes these issues:

http://distfiles.scode.org/pkgsrc/libtorrent_solaris.patch

It:

* patches configure to include <unistd.h> when compiling on Solaris.
* patches rak/socket_address.h to use AF_UNIX instead of AF_LOCAL for the 
af_local constant
* patches memory_chunk.cc to include an inline declaration of madvise()

The third item is just ugly, but I could not see a better way to do this until 
Solaris is fixed (if it's a bug; it is my current understanding of the issue 
but perhaps I am wrong).




Home | Main Index | Thread Index | Old Index