On Jun 3, 3:52pm, [email protected] (Patrick Welche) wrote: -- Subject: Re: linux emulation take two
| On Tue, Jun 02, 2015 at 03:34:31PM +0000, Christos Zoulas wrote: | > In article <[email protected]>, | > Patrick Welche <[email protected]> wrote: | > >Starting again... On the same -current/amd64 computer, with suse 13.2 | > >installed, /emul/linux32/usr/bin/xeyes fails with: | > | > There is no chance those will work under linux32. You need to | > convert the msghdr structures and the iov's... Copying the | > sendmsg/recvmsg code from linux/common/linux_socket.c to | > linux32/common/linux32_socket.c, adjusting the structs, and then | > doing the iov conversions like they are done in | > netbsd32/netbsd32_socket.c is what needs to be done to get those | > working. Give it a try! It should not be too hard, all the bits | > are there. | | I've been having a good crack at it - this bit doesn't look promising though: | | /* | * Linux alignment requirement for CMSG struct manipulation. | * Linux aligns on (size_t) boundary on all architectures. | * Fortunately for linux, linux_cmsghdr is always size_t aligned ! | * since no padding is added between the header and data. | * XXX: this code isn't right for the compat32 code. | */ | struct linux_cmsghdr { | size_t cmsg_len; /* NB not socklen_t */ | int cmsg_level; | int cmsg_type; | /* unsigned char __cmsg_data[0]; */ | }; I think on 32 bits that would be netbsd32_size_t, so you'd need struct linux32_cmsghdr? christos
