diff --git a/harbour/source/rdd/dbfntx/dbfntx1.c b/harbour/source/rdd/dbfntx/dbfntx1.c index 283d944715..bf098c6102 100644 --- a/harbour/source/rdd/dbfntx/dbfntx1.c +++ b/harbour/source/rdd/dbfntx/dbfntx1.c @@ -2531,7 +2531,7 @@ static ERRCODE hb_ntxIndexCreate( LPNTXINDEX pIndex ) #endif while( --nAttemptLeft ) { - #if !defined( HB_OS_LINUX ) && !defined( HB_OS_BSD ) + #if !defined( HB_OS_UNIX ) && !defined( HB_OS_BSD ) tmpnam( pszTempName ); sortInfo.tempHandle = hb_fsCreate( (BYTE*)pszTempName,FC_NORMAL ); if( sortInfo.tempHandle != FS_ERROR ) diff --git a/harbour/source/rtl/fstemp.c b/harbour/source/rtl/fstemp.c index 3c2f912184..fad61a0796 100644 --- a/harbour/source/rtl/fstemp.c +++ b/harbour/source/rtl/fstemp.c @@ -70,7 +70,11 @@ static BOOL hb_fsTempName( BYTE * pszBuffer, const BYTE * pszDir, const BYTE * p pszBuffer[ 0 ] = '\0'; - tmpnam( ( char * ) pszBuffer ); + #ifndef HB_OS_UNIX + tmpnam( ( char * ) pszBuffer ); + #else + mkstemp( ( char * ) pszBuffer ); + #endif return pszBuffer[ 0 ] != '\0'; }