timing_load_creds requires POSIX1.2001 due to rusage
Fixes
# include <openssl/err.h>
# include <openssl/bio.h>
# include "internal/e_os.h"
+# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
# ifndef timersub
/* struct timeval * subtraction; a must be greater than or equal to b */
@@ -91,10 +92,11 @@ static void usage(void)
exit(EXIT_FAILURE);
}
# endif
+#endif
int main(int ac, char **av)
{
-#ifdef OPENSSL_SYS_UNIX
+#if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
int i, debug = 0, count = 100, what = 'c';
struct stat sb;
FILE *fp;
@@ -206,13 +208,8 @@ int main(int ac, char **av)
OPENSSL_free(contents);
return EXIT_SUCCESS;
#else
-# if defined(OPENSSL_SYS_WINDOWS)
- fprintf(stderr, "This tool is not supported on Windows\n");
-# elif defined(OPENSSL_SYS_VMS)
- fprintf(stderr, "This tool is not supported on VMS\n");
-# else
- fprintf(stderr, "This tool is not supported on this platform\n");
-# endif
+ fprintf(stderr,
+ "This tool is not supported on this platform for lack of POSIX1.2001 support\n");
exit(EXIT_FAILURE);
#endif
}
