Hi Adrian, > The change in [1] to use fixed-width members in fake_msg broke fakeroot > on m68k as this change altered the offsets in the fakestat struct due to > the additional #pragma pack(4) statements [2]: > > > libfakeroot, when sending message: Invalid argument > > On m68k, the default alignment is 16 bits, not 32 bits which is why the > change in [1] affected the offsets in the fakestat struct. > > So, for m68k, the #pragma pack() statements will need to be guarded.
As an author of the commit [1] that introduced the regression, let me clarify my usecase first before I push other PRs on the topic. My goal is to ensure structure alignment across chroots of multiple architectures, i.e: # amd64 unprivileged host ARCH=x32 fakeroot pbuilder build package_version-1.dsc Unfortunately even with [1] in place, msgrcv(2) pads first structure member, mtype, in accordance with target architecture, so while i386 pbuilder chroot works with amd64 host fakeroot (with libfakeroot installed in chroot, of course!), x32 chroot hangs due to incorrect padding of mtype. I created a second patch dynamically guessing the mtype value and achieved the smoothless operation of said amd64-i386 and amd64-x32 combos. However, my current solution takes only mtype field into account, while the padding difference will likely introduce more discrepancies in other parts of the 'fakestat' structure. Should I use Google's protobuf-c for fast padding-agnostic serialization instead? I see it as the only sane way to achieve interoperability without the need to touch pragma packs. -- Vasyl Gello ================================================== Certified SolidWorks Expert Mob.:+380 (98) 465 66 77 E-Mail: vasek.ge...@gmail.com Skype: vasek.gello ================================================== 호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다
signature.asc
Description: PGP signature