View | Details | Raw Unified | Return to bug 206846 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-1 / +2 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	rofi
3
PORTNAME=	rofi
4
PORTVERSION=	0.15.11
4
PORTVERSION=	0.15.11
5
PORTREVISION=	1
5
CATEGORIES=	x11
6
CATEGORIES=	x11
6
7
7
MAINTAINER=	nomoo@nomoo.ru
8
MAINTAINER=	nomoo@nomoo.ru
Lines 25-31 Link Here
25
26
26
I3_DESC=	I3 support
27
I3_DESC=	I3 support
27
I3_BUILD_DEPENDS=	i3:${PORTSDIR}/x11-wm/i3
28
I3_BUILD_DEPENDS=	i3:${PORTSDIR}/x11-wm/i3
28
I3_CFLAGS=	-I${LOCALBASE}/include/i3
29
I3_CFLAGS=	-I${LOCALBASE}/include
29
30
30
PLIST_FILES=	bin/rofi bin/rofi-sensible-terminal man/man1/rofi.1.gz \
31
PLIST_FILES=	bin/rofi bin/rofi-sensible-terminal man/man1/rofi.1.gz \
31
		man/man1/rofi-sensible-terminal.1.gz
32
		man/man1/rofi-sensible-terminal.1.gz
(-)files/patch-source_i3-support.c (+24 lines)
Line 0 Link Here
1
# Description: Use correct namelen when connecting to i3 socket
2
# Pull Request: https://github.com/DaveDavenport/rofi/pull/330
3
--- source/i3-support.c.orig	2015-12-27 18:45:50 UTC
4
+++ source/i3-support.c
5
@@ -50,7 +50,7 @@ char *i3_socket_path = NULL;
6
 void i3_support_focus_window ( Window id )
7
 {
8
     i3_ipc_header_t    head;
9
-    int                s, len;
10
+    int                s;
11
     ssize_t            t;
12
     struct sockaddr_un remote;
13
     size_t             upm = sizeof ( remote.sun_path );
14
@@ -68,9 +68,8 @@ void i3_support_focus_window ( Window id
15
 
16
     remote.sun_family = AF_UNIX;
17
     g_strlcpy ( remote.sun_path, i3_socket_path, upm );
18
-    len = strlen ( remote.sun_path ) + sizeof ( remote.sun_family );
19
 
20
-    if ( connect ( s, ( struct sockaddr * ) &remote, len ) == -1 ) {
21
+    if ( connect ( s, ( struct sockaddr * ) &remote, sizeof ( struct sockaddr_un ) ) == -1 ) {
22
         fprintf ( stderr, "Failed to connect to I3 (%s): %s\n", i3_socket_path, strerror ( errno ) );
23
         close ( s );
24
         return;

Return to bug 206846