D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread Chinmoy Ranjan Pradhan
This revision was automatically updated to reflect the committed changes.
Closed by commit R241:2a2a8a0fe5ab: Do not assume layout of msghdr and iovec 
structure (authored by chinmoyr).

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11011?vs=28573=28576

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

AFFECTED FILES
  src/ioslaves/file/sharefd_p.h

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread David Faure
dfaure accepted this revision.
dfaure added a comment.


  Thanks, this is good to go in. In fact I'll put it in 5.44 since it fixes a 
compilation error.

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr updated this revision to Diff 28573.
chinmoyr added a comment.


  used &

REPOSITORY
  R241 KIO

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11011?vs=28551=28573

BRANCH
  master

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

AFFECTED FILES
  src/ioslaves/file/sharefd_p.h

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread David Faure
dfaure added inline comments.

INLINE COMMENTS

> sharefd_p.h:85
> +msg.msg_iovlen = 1;
> +msg.msg_control = _buf;
> +msg.msg_controllen = sizeof cmsg_buf;

Looks good, it's just a bit inconsistent that iov_base points to io_buf 
(without &) and msg_control points to _buf (with &), both members being 
char [N]. It turns out that both work, but why not use the same syntax both 
times?

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread A . Wilcox
awilcox added a comment.


  That's fine with me.

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread Chinmoy Ranjan Pradhan
chinmoyr added a comment.


  In D11011#217980 , @awilcox wrote:
  
  > I can confirm that this patch does fix the build on musl.  Thank you!
  
  
  I will push this after David's review. I hope it's not a problem?

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread A . Wilcox
awilcox accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R241 KIO

BRANCH
  master

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

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-04 Thread A . Wilcox
awilcox added a comment.


  I can confirm that this patch does fix the build on musl.  Thank you!

REPOSITORY
  R241 KIO

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

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh


D11011: Do not assume layout of msghdr and iovec structure

2018-03-03 Thread Chinmoy Ranjan Pradhan
chinmoyr created this revision.
chinmoyr added reviewers: dfaure, awilcox.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.
chinmoyr requested review of this revision.

REVISION SUMMARY
  Class FDMessageHeader assumes the layout of msghdr and iovec structure in its 
constructor. This assumption is wrong
  because as per POSIX standards both may contain more members than usual. This 
patch fixes the issue.
  
  BUG: 391367

REPOSITORY
  R241 KIO

BRANCH
  master

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

AFFECTED FILES
  src/ioslaves/file/sharefd_p.h

To: chinmoyr, dfaure, awilcox
Cc: #frameworks, michaelh