[scponly] Building scponly 4.1 on Solaris

Jeroen Scheerder Jeroen.Scheerder at phil.uu.nl
Wed Nov 16 00:21:26 EST 2005


*,

I've built scponly 4.1 for Solaris.  I found two issues.

1.  scponly does not build in a separate build tree; you need to
    compile it in its own source directory.

2.  Since it uses a function that's Linux-specific (asprintf), a 
    little patch was necessary.  Context diffs follow.

Regards, Jeroen.


*** scponly.c   Tue Nov 15 09:33:19 2005
--- scponly.c.org       Wed Apr 13 07:31:27 2005
***************
*** 511,520 ****
        {
  
  #ifdef UNISON_COMPAT
-               env[0] = malloc(FILENAME_MAX);
                if (((strlen(homedir) + 6 ) > FILENAME_MAX) ||
!                       env[0] == NULL ||
!                       (-1 == sprintf( env[0], "HOME=%s", homedir)))
                {
                        syslog(LOG_ERR, "could not set HOME environment variable(%s))", logstamp());
                        exit(EXIT_FAILURE);
--- 511,518 ----
        {
  
  #ifdef UNISON_COMPAT
                if (((strlen(homedir) + 6 ) > FILENAME_MAX) ||
!                       (-1 == asprintf( &env[0], "HOME=%s", homedir)))
                {
                        syslog(LOG_ERR, "could not set HOME environment variable(%s))", logstamp());
                        exit(EXIT_FAILURE);



More information about the scponly mailing list