From 03a54355841c32dbd021934325aa0d1b6a6fe0e4 Mon Sep 17 00:00:00 2001 From: Marc Singer Date: Sat, 31 Mar 2012 12:32:15 -0700 Subject: [PATCH] Issue 47: Does not build on Mac OSX o From a poster: Just looking at this error a little more, the fix is easy for lion. Change line 1664 to: char cmsg_buf[CMSG_SPACE(sizeof(int))]; And you should be able to get it to compile. o Made a compatible change even though the original code was valid. Probably a compiler version issue. --- shellinabox/launcher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shellinabox/launcher.c b/shellinabox/launcher.c index 7fbda4b..8c89578 100644 --- a/shellinabox/launcher.c +++ b/shellinabox/launcher.c @@ -1661,7 +1661,8 @@ static void launcherDaemon(int fd) { } // Send file handle and process id back to parent - char cmsg_buf[CMSG_SPACE(sizeof(int))] = { 0 }; + char cmsg_buf[CMSG_SPACE(sizeof(int))]; // = { 0 }; // Valid initializer makes OSX mad. + cmsg_buf[0] = 0; struct iovec iov = { 0 }; struct msghdr msg = { 0 }; iov.iov_base = &pid;