File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,6 +111,13 @@ int copy_file(const char* in, const char* out)
111111 XFCLOSE (outFile );
112112 return ret ;
113113}
114+
115+ #if defined(__MACH__ ) || defined(__FreeBSD__ )
116+ int link_file (const char * in , const char * out )
117+ {
118+ return link (in , out );
119+ }
120+ #endif
114121#endif /* !NO_FILESYSTEM */
115122
116123#if !defined(NO_FILESYSTEM ) && !defined(NO_CERTS ) && !defined(NO_RSA ) && \
Original file line number Diff line number Diff line change @@ -327,7 +327,7 @@ static int test_crl_monitor(void)
327327 if (i % 2 == 0 ) {
328328 /* succeed on even rounds */
329329 sprintf (buf , "%s/%s" , tmpDir , "crl.pem" );
330- if (copy_file ("certs/crl/crl.pem" , buf ) != 0 ) {
330+ if (STAGE_FILE ("certs/crl/crl.pem" , buf ) != 0 ) {
331331 fprintf (stderr , "[%d] Failed to copy file to %s\n" , i , buf );
332332 goto cleanup ;
333333 }
@@ -350,7 +350,7 @@ static int test_crl_monitor(void)
350350 else {
351351 /* fail on odd rounds */
352352 sprintf (buf , "%s/%s" , tmpDir , "crl.revoked" );
353- if (copy_file ("certs/crl/crl.revoked" , buf ) != 0 ) {
353+ if (STAGE_FILE ("certs/crl/crl.revoked" , buf ) != 0 ) {
354354 fprintf (stderr , "[%d] Failed to copy file to %s\n" , i , buf );
355355 goto cleanup ;
356356 }
Original file line number Diff line number Diff line change @@ -656,6 +656,13 @@ int rem_dir(const char* dirName);
656656int rem_file (const char * fileName );
657657int copy_file (const char * in , const char * out );
658658
659+ #if defined(__MACH__ ) || defined(__FreeBSD__ )
660+ int link_file (const char * in , const char * out );
661+ #define STAGE_FILE (x ,y ) link_file((x),(y))
662+ #else
663+ #define STAGE_FILE (x ,y ) copy_file((x),(y))
664+ #endif
665+
659666void signal_ready (tcp_ready * ready );
660667
661668/* wolfSSL */
You can’t perform that action at this time.
0 commit comments