Bug 139081 - Fails to set TOS on NetBSD
Summary: Fails to set TOS on NetBSD
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: NetBSD pkgsrc NetBSD
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-21 06:52 UTC by shattered
Modified: 2008-01-10 19:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shattered 2006-12-21 06:52:56 UTC
Version:           2.1beta1 (using KDE KDE 3.5.4)
Installed from:    NetBSD pkgsrc
Compiler:          gcc version 3.3.3 (NetBSD nb3 20040520) 
OS:                NetBSD

setsockopt(...,IP_TOS,...) argument has type 'int' on NetBSD:

--- libktorrent/net/socket.cpp.orig	2006-12-16 11:58:10.000000000 +0000
+++ libktorrent/net/socket.cpp
@@ -258,7 +262,7 @@
 	
 	bool Socket::setTOS(char type_of_service)
 	{
-#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020)
+#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020) || defined(Q_OS_NETBSD)
 		int c = type_of_service;
 #else
 		char c = type_of_service;
Comment 1 Joris Guisson 2006-12-21 13:23:17 UTC
SVN commit 615401 by guisson:

setsockopt IP_TOS needs an int as argument on NetBSD, thanks to Sergey for pointing this out.

BUG:139081



 M  +1 -1      socket.cpp  


--- trunk/extragear/network/ktorrent/libktorrent/net/socket.cpp #615400:615401
@@ -258,7 +258,7 @@
 	
 	bool Socket::setTOS(char type_of_service)
 	{
-#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020)
+#if defined(Q_OS_MACX) || defined(Q_OS_DARWIN) || (defined(Q_OS_FREEBSD) && __FreeBSD_version < 600020) || defined(Q_OS_NETBSD) 
 		int c = type_of_service;
 #else
 		char c = type_of_service;
Comment 2 shattered 2008-01-08 18:57:49 UTC
DragonFly needs similar treatment, see http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/ktorrent/patches/patch-aa
Comment 3 Joris Guisson 2008-01-10 19:52:33 UTC
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