Changeset 13080


Ignore:
Timestamp:
Nov 10, 2011, 3:31:43 AM (11 years ago)
Author:
jordan
Message:

(trunk libT) #4625 "Transmission 2.42 fails to build on Solaris 10: Undefined symbol 'mkdtemp'" -- fixed.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r13079 r13080  
    102102
    103103AC_CHECK_HEADERS([stdbool.h])
    104 AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll])
     104AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll mkdtemp])
    105105AC_PROG_INSTALL
    106106AC_PROG_MAKE_SET
  • trunk/libtransmission/torrent.c

    r12931 r13080  
    27572757    base = tr_strdup_printf( "%s__XXXXXX", tr_torrentName( tor ) );
    27582758    tmpdir = tr_buildPath( top, base, NULL );
    2759     mkdtemp( tmpdir );
     2759    tr_mkdtemp( tmpdir );
    27602760    tr_free( base );
    27612761
  • trunk/libtransmission/utils.c

    r12981 r13080  
    1818 #define HAVE_GETPAGESIZE
    1919 #define HAVE_ICONV_OPEN
     20 #define HAVE_MKDTEMP
    2021 #define HAVE_VALLOC
    2122#endif
     
    503504    tr_free( tmp );
    504505    return ret;
     506}
     507
     508char*
     509tr_mkdtemp( char * template )
     510{
     511#ifdef HAVE_MKDTEMP
     512    return mkdtemp( template );
     513#else
     514    if( !mktemp( template ) || mkdir( template, 0700 ) )
     515        return NULL;
     516    return template;
     517#endif
    505518}
    506519
  • trunk/libtransmission/utils.h

    r13029 r13080  
    222222 */
    223223int tr_mkdirp( const char * path, int permissions ) TR_GNUC_NONNULL(1);
     224
     225/** @brief Portability wrapper for mkdtemp() that uses the system implementation if available */
     226char* tr_mkdtemp( char * template );
    224227
    225228
Note: See TracChangeset for help on using the changeset viewer.