summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2015-04-27 03:34:44 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2015-04-27 03:34:44 +0000
commit9d32dcfad230ef72f97a440f122b626063c01327 (patch)
tree473b68f81aaf92b508b9e17264c5199c4fc405d6 /lib/libcrypto
parent17c9b763987a4e605455bf7e7e0923be67e6910b (diff)
Support AIX versions without WPAR support.
From Michael Felt.
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/arc4random/getentropy_aix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libcrypto/arc4random/getentropy_aix.c b/lib/libcrypto/arc4random/getentropy_aix.c
index 644a32a9091..978bd144c04 100644
--- a/lib/libcrypto/arc4random/getentropy_aix.c
+++ b/lib/libcrypto/arc4random/getentropy_aix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getentropy_aix.c,v 1.1 2015/03/30 11:29:48 bcook Exp $ */
+/* $OpenBSD: getentropy_aix.c,v 1.2 2015/04/27 03:34:43 bcook Exp $ */
/*
* Copyright (c) 2015 Michael Felt <aixtools@gmail.com>
@@ -222,7 +222,9 @@ getentropy_fallback(void *buf, size_t len)
struct timespec ts;
struct timeval tv;
perfstat_cpu_total_t cpustats;
+#ifdef _AIX61
perfstat_cpu_total_wpar_t cpustats_wpar;
+#endif
perfstat_partition_total_t lparstats;
perfstat_disk_total_t diskinfo;
perfstat_netinterface_total_t netinfo;
@@ -257,8 +259,10 @@ getentropy_fallback(void *buf, size_t len)
HX(perfstat_cpu_total(NULL, &cpustats,
sizeof(cpustats), 1) == -1, cpustats);
+#ifdef _AIX61
HX(perfstat_cpu_total_wpar(NULL, &cpustats_wpar,
sizeof(cpustats_wpar), 1) == -1, cpustats_wpar);
+#endif
HX(perfstat_partition_total(NULL, &lparstats,
sizeof(lparstats), 1) == -1, lparstats);