Bug 177220

Summary: kppp fails to build on Solaris 10. sethostname exists in libc, but is not defined in /usr/include/unistd.h
Product: [Applications] kppp Reporter: Ben Taylor <bentaylor.solx86>
Component: generalAssignee: Harri Porten <porten>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Solaris   
Latest Commit: Version Fixed In:
Attachments: patch

Description Ben Taylor 2008-12-08 13:38:12 UTC
Version:            (using KDE 4.1.3)
Compiler:          Sun Studio 12 Solaris 10, x64
OS:                Solaris
Installed from:    Compiled From Sources

kppp does a linktest for sethostname, which passes because sethostname is in Solaris 10's libc, but is not declared in 
/usr/include/unistd.h, as it is on Solaris Express (aka
SXCE and Nevada).  When opener.cpp is compiled, it fails because
there is no declaration for sethostname.

I tested a crude patch that declared sethostname as it is 
defined in opener.cpp in opener.h using a SOLARIS10 define
that we have in our build environment.  It built correctly.
Comment 1 Harri Porten 2008-12-08 14:21:53 UTC
Could you attach that patch? Thank you.
Comment 2 tropikhajma 2009-07-27 22:09:45 UTC
Created attachment 35681 [details]
patch

this is the patch
Comment 3 Lamarque V. Souza 2011-03-20 22:51:44 UTC
SVN commit 1225429 by lvsouza:

Fix kppp fails to build on Solaris 10. sethostname exists in libc, but is not defined in /usr/include/unistd.h
Thanks tropikhajma for the patch.

BUG: 177220


 M  +6 -0      opener.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225429
Comment 4 Lamarque V. Souza 2011-03-20 22:58:59 UTC
SVN commit 1225430 by lvsouza:

Backporting 1225429: Fix kppp fails to build on Solaris 10. sethostname exists in libc, but is not
defined in /usr/include/unistd.h
Thanks tropikhajma for the patch.

BUG: 177220


 M  +5 -0      opener.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1225430