From owner-svn-ports-head@freebsd.org Sat Feb 20 08:12:26 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 490E0AAF0BC; Sat, 20 Feb 2016 08:12:26 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2440802; Sat, 20 Feb 2016 08:12:25 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1K8CO1e032632; Sat, 20 Feb 2016 08:12:24 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1K8CO8E032630; Sat, 20 Feb 2016 08:12:24 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201602200812.u1K8CO8E032630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Sat, 20 Feb 2016 08:12:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r409225 - in head/x11/rofi: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2016 08:12:26 -0000 Author: pi Date: Sat Feb 20 08:12:24 2016 New Revision: 409225 URL: https://svnweb.freebsd.org/changeset/ports/409225 Log: x11/rofi: fix I3 option MFH: 2016Q1 PR: 206846 Submitted by: Tobias Kortkamp Approved by: nomoo@nomoo.ru (maintainer) Added: head/x11/rofi/files/ head/x11/rofi/files/patch-source_i3-support.c (contents, props changed) Modified: head/x11/rofi/Makefile Modified: head/x11/rofi/Makefile ============================================================================== --- head/x11/rofi/Makefile Sat Feb 20 08:00:53 2016 (r409224) +++ head/x11/rofi/Makefile Sat Feb 20 08:12:24 2016 (r409225) @@ -2,6 +2,7 @@ PORTNAME= rofi PORTVERSION= 0.15.11 +PORTREVISION= 1 CATEGORIES= x11 MAINTAINER= nomoo@nomoo.ru @@ -25,7 +26,7 @@ OPTIONS_DEFINE= I3 I3_DESC= I3 support I3_BUILD_DEPENDS= i3:${PORTSDIR}/x11-wm/i3 -I3_CFLAGS= -I${LOCALBASE}/include/i3 +I3_CFLAGS= -I${LOCALBASE}/include PLIST_FILES= bin/rofi bin/rofi-sensible-terminal man/man1/rofi.1.gz \ man/man1/rofi-sensible-terminal.1.gz Added: head/x11/rofi/files/patch-source_i3-support.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/rofi/files/patch-source_i3-support.c Sat Feb 20 08:12:24 2016 (r409225) @@ -0,0 +1,24 @@ +# Description: Use correct namelen when connecting to i3 socket +# Pull Request: https://github.com/DaveDavenport/rofi/pull/330 +--- source/i3-support.c.orig 2015-12-27 18:45:50 UTC ++++ source/i3-support.c +@@ -50,7 +50,7 @@ char *i3_socket_path = NULL; + void i3_support_focus_window ( Window id ) + { + i3_ipc_header_t head; +- int s, len; ++ int s; + ssize_t t; + struct sockaddr_un remote; + size_t upm = sizeof ( remote.sun_path ); +@@ -68,9 +68,8 @@ void i3_support_focus_window ( Window id + + remote.sun_family = AF_UNIX; + g_strlcpy ( remote.sun_path, i3_socket_path, upm ); +- len = strlen ( remote.sun_path ) + sizeof ( remote.sun_family ); + +- if ( connect ( s, ( struct sockaddr * ) &remote, len ) == -1 ) { ++ if ( connect ( s, ( struct sockaddr * ) &remote, sizeof ( struct sockaddr_un ) ) == -1 ) { + fprintf ( stderr, "Failed to connect to I3 (%s): %s\n", i3_socket_path, strerror ( errno ) ); + close ( s ); + return;