hi all,
it happens that i have to use an sun solaris 8 server for installing ser, radiusclient and freeradius.
unfortunately i have got a problem while making radiusclient:
make[2]: Entering directory `/var/home/tju/SER-Server/radiusclient-0.4.3/src'
/bin/bash ../libtool --mode=link gcc -g -O2 -o radlogin radlogin.o radius.o local.o ../lib/libradiusclient.la -lcrypt -lsocket -lnsl
gcc -g -O2 -o .libs/radlogin radlogin.o radius.o local.o ../lib/.libs/libradiusclient.so -lcrypt -lsocket -lnsl -R/usr/local/lib
Undefined first referenced
symbol in file
strsep ../lib/.libs/libradiusclient.so
ld: fatal: Symbol referencing errors. No output written to .libs/radlogin
collect2: ld returned 1 exit status
make[2]: *** [radlogin] Error 1
make[2]: Leaving directory `/var/home/tju/SER-Server/radiusclient-0.4.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/home/tju/SER-Server/radiusclient-0.4.3'
make: *** [all] Error 2
normally the function strsep() should be declared at string.h....but solaris is different. there is no declaration of this function or i have not found it.
does anyone had the same problem while compiling on a solaris?
regards
thomas
PS: meanwhile i tried a quckfix and added the following code into %radiusclient%/lib/dict.c (which uses strsep):
#ifndef HAVE_STRSEP
static char *
strsep(char **stringp, char *delim) {
char *start = *stringp;
char *cp;
char ch;
if (start == NULL)
return NULL;
for (cp = start; ch = *cp; cp++) {
if (strchr(delim, ch)) {
*cp++ = 0;
*stringp = cp;
return start;
}
}
*stringp = NULL;
return start;
}
#endif