diff options
author | Austin Seipp <mad.one@gmail.com> | 2009-03-20 12:48:46 +0000 |
---|---|---|
committer | Austin Seipp <mad.one@gmail.com> | 2009-03-20 12:48:46 +0000 |
commit | f50be7e999d666670c4ca0910c8a3065ea2f2411 (patch) | |
tree | 52d7799eba29821af284eba13126219d944a8efa /rts/posix/OSThreads.c | |
parent | c681514ad6151534062ff61c96a71e1c299977cc (diff) | |
download | haskell-f50be7e999d666670c4ca0910c8a3065ea2f2411.tar.gz |
Please the -Wall police by moving a variable declaration; really FIX getNumberOfProcessors() for MacOS X
Diffstat (limited to 'rts/posix/OSThreads.c')
-rw-r--r-- | rts/posix/OSThreads.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index d4d4382134..324701d40d 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -201,7 +201,6 @@ nat getNumberOfProcessors (void) { static nat nproc = 0; - size_t size = sizeof(nat); if (nproc == 0) { #if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN) @@ -209,6 +208,7 @@ getNumberOfProcessors (void) #elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF) nproc = sysconf(_SC_NPROCESSORS_CONF); #elif defined(darwin_HOST_OS) + size_t size = sizeof(nat); if(0 != sysctlbyname("hw.ncpu",&nproc,&size,NULL,0)) nproc = 1; #else |