From de58c4136773d563528b632c7ec5060b4ad44980 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 16 Jun 2004 23:49:00 +0000 Subject: [PATCH] ps, etc are UNIX only --- stepmania/src/crypto/CryptNoise.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/crypto/CryptNoise.cpp b/stepmania/src/crypto/CryptNoise.cpp index 542abd0cf0..662579e34b 100644 --- a/stepmania/src/crypto/CryptNoise.cpp +++ b/stepmania/src/crypto/CryptNoise.cpp @@ -88,12 +88,14 @@ static int read_dev_urandom(char *buf, int len) void noise_get_heavy(void (*func) (void *, int)) { char buf[512]; - FILE *fp; - int ret; if (read_dev_urandom(buf, 32)) func(buf, 32); +#if defined(UNIX) + FILE *fp; + int ret; + fp = popen("ps -axu 2>/dev/null", "r"); while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0) func(buf, ret); @@ -103,6 +105,7 @@ void noise_get_heavy(void (*func) (void *, int)) while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0) func(buf, ret); pclose(fp); +#endif } /*