diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-04-01 00:29:36 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-04-01 00:37:58 +0900 |
commit | 01cef504dd23de745b1a7e7096a6dfb1f07f35ae (patch) | |
tree | 68d3d20e41340ed07ae80acfc1d768071ec3a5aa /kppp/requester.cpp | |
parent | 7903711b324e40775885834f90316c0602e17662 (diff) | |
download | tdenetwork-01cef504dd23de745b1a7e7096a6dfb1f07f35ae.tar.gz tdenetwork-01cef504dd23de745b1a7e7096a6dfb1f07f35ae.zip |
Fixed FTBFS in recent distros caused by flex arrays usage in kppp.
Based on the suggestion found here: https://github.com/UAVCAN/libuavcan/issues/116#issuecomment-346879320 (thanks!)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kppp/requester.cpp')
-rw-r--r-- | kppp/requester.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kppp/requester.cpp b/kppp/requester.cpp index b5450929..016d72fa 100644 --- a/kppp/requester.cpp +++ b/kppp/requester.cpp @@ -80,7 +80,13 @@ Requester::~Requester() { // Receive file name and file descriptors from envoy // int Requester::recvFD() { - struct { struct cmsghdr cmsg; int fd; } control; + union { + struct { + char _cmsg[sizeof(struct cmsghdr)]; + char data[sizeof(int)]; // int fd field + }; + struct cmsghdr cmsg; + } control; struct msghdr msg; struct ResponseHeader response; |