From cf9a7c03e5f1692b7a3b75fa994059f5fa680f23 Mon Sep 17 00:00:00 2001 From: Daphne Pfister Date: Sun, 8 Sep 2013 19:39:00 -0500 Subject: [PATCH 2/2] Add HPUX unix socket path --- src/xcb_util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xcb_util.c b/src/xcb_util.c index c7dadee..110d845 100644 --- a/src/xcb_util.c +++ b/src/xcb_util.c @@ -182,56 +182,62 @@ static int _xcb_open_socket_path(char *protocol, const int display, const char** static int _xcb_open(const char *host, char *protocol, const int display) { int fd; const char* socket_paths[6]; static const int max_socket_path = sizeof(socket_paths) / sizeof(socket_paths[0]); int socket_path_cnt = 0; #ifndef _WIN32 static const char unix_socket_path[] = "/tmp/.X11-unix/X"; +#ifdef __hpux + static const char hpux_socket_path[] = "/usr/spool/sockets/X11/"; +#endif #if defined(HAVE_TSOL_LABEL_H) && defined(HAVE_IS_SYSTEM_LABELED) static const char tsol_socket_path[] = "/var/tsol/doors/.X11-unix/X"; #endif #endif #ifdef HAVE_LAUNCHD if(strncmp(host, "/tmp/launch", 11) == 0) { #ifndef _WIN32 _xcb_add_socket_path(socket_paths, max_socket_path, &socket_path_cnt, host); fd = _xcb_open_socket_path("unix", display, socket_paths, socket_path_cnt); if( fd >= 0 ) return fd; #endif host = ""; } else #endif if ((protocol && (strcmp("unix",protocol) == 0)) || (*host == '\0') || (strcmp("unix",host) == 0)) { #ifndef _WIN32 #if defined(HAVE_TSOL_LABEL_H) && defined(HAVE_IS_SYSTEM_LABELED) /* Check special path for Unix sockets under Solaris Trusted Extensions */ if (is_system_labeled()) { _xcb_add_socket_path(socket_paths, max_socket_path, &socket_path_cnt, tsol_socket_path); } #endif _xcb_add_socket_path(socket_paths, max_socket_path, &socket_path_cnt, unix_socket_path); +#ifdef __hpux + _xcb_add_socket_path(socket_paths, max_socket_path, &socket_path_cnt, hpux_socket_path); +#endif fd = _xcb_open_socket_path("unix", display, socket_paths, socket_path_cnt); if( fd >= 0 ) return fd; #endif if(strcmp("unix",host) == 0) host = ""; } /* display specifies TCP */ unsigned short port = X_TCP_PORT + display; return _xcb_open_tcp(host, protocol, port); return -1; /* if control reaches here then something has gone wrong */ } #ifndef _WIN32 -- 1.8.3.1