diff options
author | marha <marha@users.sourceforge.net> | 2009-10-04 19:13:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-10-04 19:13:27 +0000 |
commit | 77a4732b0637493966889fe3545966fdc12a1b5e (patch) | |
tree | 42ab7f9667a7b3bdd89e6bb5c50793dad170b974 /xorg-server/hw/xquartz/mach-startup/bundle-main.c | |
parent | 67b353c9ce039b254ba2e92cd6f842c505a8bd21 (diff) | |
download | vcxsrv-77a4732b0637493966889fe3545966fdc12a1b5e.tar.gz vcxsrv-77a4732b0637493966889fe3545966fdc12a1b5e.tar.bz2 vcxsrv-77a4732b0637493966889fe3545966fdc12a1b5e.zip |
Updated to
xkeyboard-config-1.7
pixman-0.16.2
libX11-1.3
libXinerama-1.1
xkbcomp-1.1.1
recordproto-1.14
xineramaproto-1.2
inputproto-2.0
compositeproto-0.4.1
xorg-server-1.7.0
Diffstat (limited to 'xorg-server/hw/xquartz/mach-startup/bundle-main.c')
-rw-r--r-- | xorg-server/hw/xquartz/mach-startup/bundle-main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xorg-server/hw/xquartz/mach-startup/bundle-main.c b/xorg-server/hw/xquartz/mach-startup/bundle-main.c index e887c469d..917bbafbe 100644 --- a/xorg-server/hw/xquartz/mach-startup/bundle-main.c +++ b/xorg-server/hw/xquartz/mach-startup/bundle-main.c @@ -149,15 +149,17 @@ static int accept_fd_handoff(int connected_fd) { char databuf[] = "display"; struct iovec iov[1]; - iov[0].iov_base = databuf; - iov[0].iov_len = sizeof(databuf); - union { struct cmsghdr hdr; char bytes[CMSG_SPACE(sizeof(int))]; } buf; struct msghdr msg; + struct cmsghdr *cmsg; + + iov[0].iov_base = databuf; + iov[0].iov_len = sizeof(databuf); + msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = buf.bytes; @@ -166,7 +168,7 @@ static int accept_fd_handoff(int connected_fd) { msg.msg_namelen = 0; msg.msg_flags = 0; - struct cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); + cmsg = CMSG_FIRSTHDR (&msg); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN(sizeof(int)); @@ -197,6 +199,7 @@ static void socket_handoff_thread(void *arg) { socket_handoff_t *handoff_data = (socket_handoff_t *)arg; int launchd_fd = -1; int connected_fd; + unsigned remain; /* Now actually get the passed file descriptor from this connection * If we encounter an error, keep listening. @@ -229,7 +232,7 @@ static void socket_handoff_thread(void *arg) { * into it. */ - unsigned remain = 3000000; + remain = 3000000; fprintf(stderr, "X11.app: Received new $DISPLAY fd: %d ... sleeping to allow xinitrc to catchup.\n", launchd_fd); while((remain = usleep(remain)) > 0); @@ -626,11 +629,11 @@ static char *command_from_prefs(const char *key, const char *default_value) { if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { CFStringRef cfDefaultValue = CFStringCreateWithCString(NULL, default_value, kCFStringEncodingASCII); + int len = strlen(default_value) + 1; CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication); CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); - int len = strlen(default_value) + 1; command = (char *)malloc(len * sizeof(char)); if(!command) return NULL; |