On 5/17/10 9:32 PM, James McKenzie wrote:
Next stupid question: How does the patch get back into the XNU kernel code? Is there a project for it, or do we dump it on Apple's front door hoping that they will integrate it?
To be honest, I really have no idea exactly how outsiders can contribute to Darwin in general.
There's a mailing list, 'darwin-kernel@lists.apple.com', dedicated to Darwin kernel development. I would start by submitting patches there.
If it is not, then it should be something under consideration by the Wine project. Hacking the kernel to make one program work is not a 'best practice'.
That might be true, but AJ doesn't seem to be warm to the idea of doing this in Wine.
It appears that it the case. Sometimes sticking to your guns gets you shot (at least around here in Southeastern Arizona.)
Heh.
However, this is your fix and definitely your call if you want to press AJ about it, or if you want to go to Apple and get the fix into the kernel.
The thing is, the support we need already *is* in the kernel. mmap(2) supports unaligned offsets. But there are two wrappers in the System Library:
0000420c T _mmap 0000417f T _mmap$UNIX2003
The second one is the default wrapper. That wrapper rejects unaligned file offsets (to be compliant with UNIX '03). The first one, however, does not reject them. All my patch does is make Wine call the first one instead of the second one when mapping a PE file.
Chip