--- rio107.orig/std.h 2005-08-19 23:29:18.000000000 -0300 +++ rio107/std.h 2005-08-19 23:54:16.000000000 -0300 @@ -31,7 +31,8 @@ #endif #ifndef SZERROR -#define SZERROR sys_errlist[errno] +/* Vanquirius: sys_errlist is deprecated */ +#define SZERROR strerror(errno) #endif typedef unsigned char UCHAR; --- rio107.orig/app.cpp 2005-08-19 23:29:18.000000000 -0300 +++ rio107/app.cpp 2005-08-19 23:55:38.000000000 -0300 @@ -512,6 +512,8 @@ int iPortBase = PORT_BASE_DEFAULT; int iPosDumpDirectory = 0; int iSizeDumpDirectory = 0; + /* Vanquirius: LarryTheCow to the rescue! */ + int pszFilePlaylistTempLarryTheCow = 0; // process command line args if ( iCountArg < 2 ) @@ -571,7 +573,14 @@ // append all command line upload requests to temp playlist if ( !pszFilePlaylistTemp ) - pszFilePlaylistTemp = tmpnam( NULL ); + /* Vanquirius: use mkstemp instead of tmpnam */ + pszFilePlaylistTemp = strdup("/tmp/rio_XXXXXX"); + if ( (pszFilePlaylistTempLarryTheCow = mkstemp(pszFilePlaylistTemp)) < 0 ) + { + perror ("mkstemp"); + exit (EXIT_FAILURE); + } + close(pszFilePlaylistTempLarryTheCow); if ( pszFilePlaylistTemp ) {