Subject: pkg/35357: [patch] net/rtorrent does not build on Solaris
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <peter.schuller@infidyne.com>
List: pkgsrc-bugs
Date: 01/04/2007 02:30:00
>Number:         35357
>Category:       pkg
>Synopsis:       [patch] net/rtorrent 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 02:30: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:

* Solaris does not have AF_LOCAL, only AF_UNIX.

* signal_handler.h includes <sys/signal.h> instead of <signal.h>. The result is that signal() is not declared. I have not actually bothered to check exactly why this happens to be so on Solaris, but given that sys/signal.h is seemingly not part of any relevant standard, and the fact that the manpage on Solaris, FreeBSD and NetBSD and Linux all say <signal.h> is the official manpage to include, I presume the inclusion of <sys/signal.h> is incorrect.
>How-To-Repeat:

>Fix:
This patch fixes these issues:

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

It patches rak/socket_address.h to use AF_UNIX instead of AF_LOCAL for the af_local constant.

It also patches signal_handler.h to to unconditionally (regardless of platform) include <signal.h> instead of <sys/signal.h>.

Tested to still build on FreeBSD aswell.

(Note: This makes it build. There is at least one runtime issue, possibly having to do with curses, that I have not examined. Will file a separate PR if/when I look at it.)