Subject: pkg/32295: net/wmnet Solaris 10 / Sun Studio 11
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 12/13/2005 15:20:01
>Number:         32295
>Category:       pkg
>Synopsis:       net/wmnet Solaris 10 / Sun Studio 11
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 13 15:20:01 +0000 2005
>Originator:     Jake Kupersmith
>Release:        pkgsrc
SunOS 5.10 Generic sun4u sparc SUNW,Sun-Blade-100
alloca is defined in alloca.h on Solaris.  wmnet.c does not include this file and is causing a link error with Sun Studio 11.
# bmake
LD_RUN_PATH=/usr/pkg/lib cc -o wmnet -O      -L/usr/pkg/lib wmnet.o drivers.o getopt.o getopt1.o -lXext -lX11 -lm -lkstat    -lsocket -lnsl  
Undefined                       first referenced
 symbol                             in file
alloca                              wmnet.o
ld: fatal: Symbol referencing errors. No output written to wmnet

wmnet.c gets patched in patch-ad.. I added the include to wmnet.c and created a new patch.  Here is a diff of my changes to wmnet.c after it gets patched by the original patch-ad.

# diff -u wmnet.c.orig.2 wmnet.c
--- wmnet.c.orig.2      Tue Dec 13 00:14:12 2005
+++ wmnet.c     Tue Dec 13 00:14:28 2005
@@ -59,6 +59,7 @@
 # include<sys/socket.h>
 # include"getopt.h"
 #elif defined (sun)
+# include<alloca.h>
 # include<sys/socket.h>
 # include<sys/sockio.h>
 # include "getopt.h"