summaryrefslogtreecommitdiffstats
path: root/kppp/requester.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kppp/requester.cpp')
-rw-r--r--kppp/requester.cpp8
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;