Version: 2.1beta1 (using KDE KDE 3.5.4) Installed from: NetBSD pkgsrc Compiler: gcc version 3.3.3 (NetBSD nb3 20040520) OS: NetBSD NetBSD doesn't support MSG_NOSIGNAL; maybe it's not needed at all? (since SIGPIPE is ignored anyway) --- libktorrent/net/socket.cpp.orig 2006-12-16 11:58:10.000000000 +0000 +++ libktorrent/net/socket.cpp @@ -160,7 +160,11 @@ namespace net int Socket::send(const bt::Uint8* buf,int len) { +#ifdef MSG_NOSIGNAL int ret = ::send(m_fd,buf,len,MSG_NOSIGNAL); +#else + int ret = ::send(m_fd,buf,len,0); +#endif if (ret < 0) { if (errno != EAGAIN && errno != EWOULDBLOCK)
Do you know if NetBSD supports SO_NOSIGPIPE as a socket option ? So that we can just add NetBSD to the following if statements : #if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020) || defined (Q_OS_SOLARIS) #define MSG_NOSIGNAL 0 #endif #if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020) int val = 1; if (setsockopt(m_fd,SOL_SOCKET,SO_NOSIGPIPE,&val,sizeof(int)) < 0) { Out(SYS_CON|LOG_NOTICE) << QString("Failed to set the NOSIGPIPE option : %1").arg(strerror(errno)) << endl; } #endif
Nope, no SO_NOSIGPIPE either...
SVN commit 616060 by guisson: NetBSD does not have MSG_NOSIGNAL, so just define it as 0 BUG: 139110 M +1 -1 socket.cpp --- trunk/extragear/network/ktorrent/libktorrent/net/socket.cpp #616059:616060 @@ -38,7 +38,7 @@ #include <sys/filio.h> #endif -#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020) || defined (Q_OS_SOLARIS) +#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020) || defined (Q_OS_SOLARIS) || defined(Q_OS_NETBSD) #define MSG_NOSIGNAL 0 #endif
The patch in pkgsrc uses "#ifdef MSG_NOSIGNAL" instead, see http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/ktorrent/patches/patch-aa
SVN commit 759489 by guisson: Fix socket.cpp for Dragonfly BSD BUG: 139081 BUG: 139110 M +3 -3 socket.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=759489