--- librsb-1.3.0.1/rsb_test_matops.c.orig 2022-02-24 11:11:02.000000000 +0100 +++ librsb-1.3.0.1/rsb_test_matops.c 2022-10-15 13:44:55.920772450 +0200 @@ -1979,7 +1979,7 @@ RSB_STDOUT("# Memory benchmark took %.3lfs\n",dt); } -#ifdef RSB_HAVE_UNISTD_H +#ifdef RSB_HAVE_SETENV { /* special environmental variables set just for the sake of being saved in .rpr files */ #ifdef RSB_CC @@ -6536,7 +6536,7 @@ RSB_STDOUT("# Memory benchmark took %.3lfs\n",dt); } -#ifdef RSB_HAVE_UNISTD_H +#ifdef RSB_HAVE_SETENV { /* special environmental variables set just for the sake of being saved in .rpr files */ #ifdef RSB_CC @@ -10962,7 +10962,7 @@ RSB_STDOUT("# Memory benchmark took %.3lfs\n",dt); } -#ifdef RSB_HAVE_UNISTD_H +#ifdef RSB_HAVE_SETENV { /* special environmental variables set just for the sake of being saved in .rpr files */ #ifdef RSB_CC --- librsb-1.3.0.1/rsbench.c.orig 2022-10-15 13:54:32.053382000 +0200 +++ librsb-1.3.0.1/rsbench.c 2022-10-15 13:54:58.038005553 +0200 @@ -479,7 +479,15 @@ { const rsb_char_t *name=ava, *value=esp+1; *esp=RSB_NUL; + #ifdef RSB_HAVE_SETENV setenv(name, value, /*overwrite*/1); + #else + rsb_char_t buf[1000]; + strcpy(buf, name); + strcat(buf, "="); + strcat(buf, value); + putenv(buf); + #endif RSBENCH_STDOUT("# Calling setenv() with arguments %s and %s\n",name,value); } if( ava )