kernel32: fix cpu detection on NetBSD
Francois Gouget
fgouget at free.fr
Fri Jan 16 17:35:02 CST 2009
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?
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
Hiroshima '45 - Czernobyl '86 - Windows '95
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu.diff
Type: text/x-diff
Size: 2108 bytes
Desc: cpu.diff
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20090117/c23fa209/attachment.diff
More information about the wine-devel
mailing list