From: bcook Date: Mon, 27 Apr 2015 03:34:43 +0000 (+0000) Subject: Support AIX versions without WPAR support. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=53e581c405a10f0caa4c6cf8912eb03129bbfa8b;p=openbsd Support AIX versions without WPAR support. From Michael Felt. --- 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 @@ -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); diff --git a/lib/libcrypto/crypto/getentropy_aix.c b/lib/libcrypto/crypto/getentropy_aix.c index 644a32a9091..978bd144c04 100644 --- a/lib/libcrypto/crypto/getentropy_aix.c +++ b/lib/libcrypto/crypto/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 @@ -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);