The patch is mainly a cleanup and casting warnings but there is one AMD64 specific cleanup of typedef mismatch. Works great now.
Created attachment 21033 [details, diff] AMD64 Cleanup and typedef patch.
Created attachment 21034 [details, diff] Ebuild diff to apply patch and add amd64 keyword.
Added to CVS