aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src/Proxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nxcomp/src/Proxy.cpp')
-rw-r--r--nxcomp/src/Proxy.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/nxcomp/src/Proxy.cpp b/nxcomp/src/Proxy.cpp
index 5529de021..dabf7532e 100644
--- a/nxcomp/src/Proxy.cpp
+++ b/nxcomp/src/Proxy.cpp
@@ -6294,7 +6294,15 @@ int Proxy::handleNewGenericConnectionFromProxyUnix(int channelId, T_channel_type
serverAddrUnix.sun_family = AF_UNIX;
+ #ifdef __linux__
const int serverAddrNameLength = 108;
+ #else
+ /* POSIX/SUS does not specify a length.
+ * BSD derivatives generally support 104 bytes, other systems may be more constrained.
+ * If you happen to run into such systems, extend this section with the appropriate limit.
+ */
+ const int serverAddrNameLength = 104;
+ #endif
strncpy(serverAddrUnix.sun_path, path, serverAddrNameLength);