From ddf7ef30ada3cb0e3e6e897796008e2c2df407d8 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Fri, 2 Jan 2015 07:14:15 +0000 Subject: [PATCH] fixed: compiling od Debian sockaddr_un has no sun_len member git-svn-id: svn://ttmath.org/publicrep/winix/trunk@999 e52654a7-88a9-db11-a3e9-0013d4bc506e --- core/app.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/app.cpp b/core/app.cpp index 9ec6f0b..fd457e5 100644 --- a/core/app.cpp +++ b/core/app.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include "app.h" #include "plugin.h" #include "misc.h" @@ -1807,10 +1808,12 @@ int res; return; memset(&to, 0, sizeof(to)); - to.sun_len = sizeof(to.sun_len) - + sizeof(to.sun_family) + + #ifdef __FreeBSD__ + to.sun_len = offsetof(sockaddr_un, sun_path) + socket_to_send_on_exit.size() + 1; // terminating zero + #endif to.sun_family = AF_UNIX; snprintf(to.sun_path, sizeof(to.sun_path)/sizeof(char), "%s", socket_to_send_on_exit.c_str());