summaryrefslogtreecommitdiffstats
path: root/kppp/opener.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kppp/opener.cpp')
-rw-r--r--kppp/opener.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/kppp/opener.cpp b/kppp/opener.cpp
index 5d90cc0e..7628681b 100644
--- a/kppp/opener.cpp
+++ b/kppp/opener.cpp
@@ -342,7 +342,13 @@ void Opener::mainLoop() {
//
int Opener::sendFD(int fd, struct ResponseHeader *response) {
- 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 iovec iov;