D6709: Add support for sharing file descriptor between KIO slave and KAuth helper

A. Wilcox noreply at phabricator.kde.org
Sun Mar 4 06:21:58 UTC 2018


awilcox reopened this revision.
awilcox added a comment.
This revision is now accepted and ready to land.


  BUG: 391367 <https://bugs.kde.org/show_bug.cgi?id=391367>:
  
  musl is strictly POSIX conformant <http://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64>, which means it uses int for msg_iovlen and socklen_t for msg_controllen in the msghdr struct.
  
  POSIX defines msghdr <http://pubs.opengroup.org/onlinepubs/009696699/basedefs/sys/socket.h.html> as containing "at least" the standard members, not "only" the standard members.
  
  Since this code (non-conformantly) assumes the members and layout of msghdr in its ctor, it FTBFS on 64-bit musl platforms (including x86_64, ppc64, aarch64):
  
    In file included from /usr/src/packages/user/kio/src/kio-5.43.0/src/ioslaves/file/fdreceiver.cpp:23:0:
    /usr/src/packages/user/kio/src/kio-5.43.0/src/ioslaves/file/sharefd_p.h: In constructor 'FDMessageHeader::FDMessageHeader()':
    /usr/src/packages/user/kio/src/kio-5.43.0/src/ioslaves/file/sharefd_p.h:78:37: error: invalid conversion from 'char (*)[24]' to 'int' [-fpermissive]
             , msg{nullptr, 0,  &io, 1,  &cmsg_buf, sizeof cmsg_buf, 0}
                                         ^~~~~~~~~
    /usr/src/packages/user/kio/src/kio-5.43.0/src/ioslaves/file/sharefd_p.h:78:55: error: invalid conversion from 'long unsigned int' to 'void*' [-fpermissive]
             , msg{nullptr, 0,  &io, 1,  &cmsg_buf, sizeof cmsg_buf, 0}
                                                           ^~~~~~~~
    /usr/src/packages/user/kio/src/kio-5.43.0/src/ioslaves/file/sharefd_p.h:78:66: warning: missing initializer for member 'msghdr::__pad2' [-Wmissing-field-initializers]
             , msg{nullptr, 0,  &io, 1,  &cmsg_buf, sizeof cmsg_buf, 0}
                                                                      ^
    /usr/src/packages/user/kio/src/kio-5.43.0/src/ioslaves/file/sharefd_p.h:78:66: warning: missing initializer for member 'msghdr::msg_flags' [-Wmissing-field-initializers]

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D6709

To: chinmoyr, thiago, #frameworks, dfaure
Cc: awilcox, dfaure, davidedmundson, elvisangelaccio, shortstheory, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180304/e172182c/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list