Package: ssmtp Version: 2.62 When building ssmtp on Solaris 10 using the Studio 12 compiler suite, the build fails with the error that strndup is an undefined symbol. Upon further investigation, I have seen that strndup is not part of strings.h on Solaris 10, and appears to be available only in the Linux strings.h header. A build history is attached.
I have been previously using ssmtp 2.48 which built and works well on Solaris 10. This version uses the strdup function, not the strndup function. I suggest that for compatibility across multiple platforms, the call to strndup be replaced with a call to the strncpy function. This will slightly complicate the code, however it will achieve better platform independence. [EMAIL PROTECTED] /home/Build/System/ssmtp-2.62-1 ./configure --sysconfdir=/etc/ssmtp creating cache ./config.cache checking for gcc... no checking for cc... cc checking whether the C compiler (cc ) works... yes checking whether the C compiler (cc ) is a cross-compiler... no checking whether we are using GNU C... no checking whether cc accepts -g... yes checking for a BSD compatible install... ./install-sh -c checking whether ln -s works... yes checking how to run the C preprocessor... cc -E checking for ANSI C header files... yes checking for limits.h... yes checking for strings.h... yes checking for syslog.h... yes checking for unistd.h... yes checking for obsolete openlog... no checking for working const... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for gethostname in -lnsl... yes checking for socket in -lsocket... yes checking return type of signal handlers... void checking for vprintf... yes checking for gethostname... yes checking for socket... yes checking for strdup... yes checking for strstr... yes updating cache ./config.cache creating ./config.status creating Makefile [EMAIL PROTECTED] /home/Build/System/ssmtp-2.62-1 make cc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DHAVE_LIBSOCKET=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DSSMTPCONFDIR=\"/etc/ssmtp/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/ssmtp/revaliases\" -g -c -o ssmtp.o ssmtp.c "ssmtp.c", line 844: warning: implicit function declaration: strndup "ssmtp.c", line 844: warning: improper pointer/integer combination: op "=" "ssmtp.c", line 1500: warning: argument #1 is incompatible with prototype: prototype: pointer to unsigned char : "ssmtp.h", line 44 argument : pointer to char "ssmtp.c", line 1500: warning: argument #2 is incompatible with prototype: prototype: pointer to const unsigned char : "ssmtp.h", line 44 argument : pointer to char "ssmtp.c", line 1512: warning: argument #1 is incompatible with prototype: prototype: pointer to unsigned char : "ssmtp.h", line 44 argument : pointer to char "ssmtp.c", line 1512: warning: argument #2 is incompatible with prototype: prototype: pointer to const unsigned char : "ssmtp.h", line 44 argument : pointer to char "ssmtp.c", line 1522: warning: argument #1 is incompatible with prototype: prototype: pointer to unsigned char : "ssmtp.h", line 44 argument : pointer to char "ssmtp.c", line 1522: warning: argument #2 is incompatible with prototype: prototype: pointer to const unsigned char : "ssmtp.h", line 44 argument : pointer to char "ssmtp.c", line 2046: warning: implicit function declaration: basename "ssmtp.c", line 2046: warning: improper pointer/integer combination: op "=" cc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DHAVE_LIBSOCKET=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DSSMTPCONFDIR=\"/etc/ssmtp/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/ssmtp/revaliases\" -g -c -o arpadate.o arpadate.c cc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DHAVE_LIBSOCKET=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DSSMTPCONFDIR=\"/etc/ssmtp/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/ssmtp/revaliases\" -g -c -o base64.o base64.c cc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DHAVE_LIBSOCKET=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DSSMTPCONFDIR=\"/etc/ssmtp/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/ssmtp/revaliases\" -g -c -o xgethostname.o xgethostname.c cc -o ssmtp ssmtp.o arpadate.o base64.o xgethostname.o -lsocket -lnsl -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DHAVE_LIBSOCKET=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DSSMTPCONFDIR=\"/etc/ssmtp/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/ssmtp/revaliases\" -g Undefined first referenced symbol in file strndup ssmtp.o ld: fatal: Symbol referencing errors. No output written to ssmtp make: *** [ssmtp] Error 1 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]