Subject: port-sparc/28226: pkgsrc/security/putty fails to build on Solaris, patch included
To: None <port-sparc-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <throwaway@right-decisions.com>
List: netbsd-bugs
Date: 11/11/2004 20:54:01
>Number:         28226
>Category:       port-sparc
>Synopsis:       pkgsrc/security/putty fails to build on Solaris, patch included
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 11 20:54:01 +0000 2004
>Originator:     Jeffrey Johnson
>Release:        PKGSRC on Solaris 8 sparc
>Organization:
NA
>Environment:
SunOS cracker 5.8 Generic_108528-29 sun4u sparc SUNW,Ultra-5_10
>Description:
The security/putty ports package fails to compile on Solaris. The Putty maintainers have created the following patch to address some of the issues:

Solaris patch (for use with GNU tools) follows:

diff -c unixold/Makefile.gtk unix/Makefile.gtk
*** unixold/Makefile.gtk        Thu Feb 12 12:43:43 2004
--- unix/Makefile.gtk   Tue Feb 17 12:11:31 2004
***************
*** 83,88 ****
--- 83,90 ----
  CFLAGS = -O2 -Wall -Werror -g -I. -I.. -I../charset `gtk-config --cflags`
  XLDFLAGS = `gtk-config --libs`
  ULDFLAGS =#
+ # Uncomment for Solaris
+ # ULDFLAGS = -lsocket -lnsl
  INSTALL=install
  INSTALL_PROGRAM=$(INSTALL)
  INSTALL_DATA=$(INSTALL)
diff -c unixold/uxnet.c unix/uxnet.c
*** unixold/uxnet.c     Tue Feb  3 08:47:43 2004
--- unix/uxnet.c        Tue Feb 17 12:10:58 2004
***************
*** 15,20 ****
--- 15,28 ----
  #include <netinet/in.h>
  #include <netinet/tcp.h>
  #include <netdb.h>
+ /* This is a hack for solaris, it keeps SIOCATMARK here. */
+ #ifndef SIOCATMARK
+ #include <sys/sockio.h>
+ #endif
+ /* For Unix flavors that don't define INADDR_NONE */
+ #ifndef INADDR_NONE
+ #define       INADDR_NONE     0xffffffff
+ #endif

  #define DEFINE_PLUG_METHOD_MACROS
  #include "putty.h"
**************
>How-To-Repeat:
bmake install on Solaris pksrc platform using gcc compilers.
>Fix:
Solaris patch (for use with GNU tools) follows:

diff -c unixold/Makefile.gtk unix/Makefile.gtk
*** unixold/Makefile.gtk        Thu Feb 12 12:43:43 2004
--- unix/Makefile.gtk   Tue Feb 17 12:11:31 2004
***************
*** 83,88 ****
--- 83,90 ----
  CFLAGS = -O2 -Wall -Werror -g -I. -I.. -I../charset `gtk-config --cflags`
  XLDFLAGS = `gtk-config --libs`
  ULDFLAGS =#
+ # Uncomment for Solaris
+ # ULDFLAGS = -lsocket -lnsl
  INSTALL=install
  INSTALL_PROGRAM=$(INSTALL)
  INSTALL_DATA=$(INSTALL)
diff -c unixold/uxnet.c unix/uxnet.c
*** unixold/uxnet.c     Tue Feb  3 08:47:43 2004
--- unix/uxnet.c        Tue Feb 17 12:10:58 2004
***************
*** 15,20 ****
--- 15,28 ----
  #include <netinet/in.h>
  #include <netinet/tcp.h>
  #include <netdb.h>
+ /* This is a hack for solaris, it keeps SIOCATMARK here. */
+ #ifndef SIOCATMARK
+ #include <sys/sockio.h>
+ #endif
+ /* For Unix flavors that don't define INADDR_NONE */
+ #ifndef INADDR_NONE
+ #define       INADDR_NONE     0xffffffff
+ #endif

  #define DEFINE_PLUG_METHOD_MACROS
  #include "putty.h"
**************