On Fri, 16 Jan 2009, Austin English wrote:
I submitted OpenBSD's patch for CPU detection a while back (http://www.winehq.org/pipermail/wine-patches/2009-January/067002.html). Francois sent a 'more correct' one (http://www.winehq.org/pipermail/wine-patches/2009-January/067382.html), but that one is broken on NetBSD/OpenBSD (http://bugs.winehq.org/show_bug.cgi?id=16927).
Argh! Sorry. I missed some places where value is used so my patch was not quite right.
With the below changes, it works again, but I'm not sure it's correct. Comments appreciated:
[...]
int value;
int value[2];
[...]
if (sysctl(mib, 2, &value, &val_len, NULL, 0) >= 0)
If you change value to an array, then &value will be an int**. AFAIU that's not what you for this sysctl.
I think the attached patch would be better. Could you confirm?