aboutsummaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2016-02-20 08:12:24 +0000
committerKurt Jaeger <pi@FreeBSD.org>2016-02-20 08:12:24 +0000
commitc2dcfefbfd57f6c1e6a31a9dea21ae1aeb730046 (patch)
treee17b684933a505abe4ffd24c52f86d714b7f6010 /x11
parent14165262f01bfa98defd3fd406b7f64739248a2d (diff)
downloadports-c2dcfefbfd57f6c1e6a31a9dea21ae1aeb730046.tar.gz
ports-c2dcfefbfd57f6c1e6a31a9dea21ae1aeb730046.zip
Notes
Diffstat (limited to 'x11')
-rw-r--r--x11/rofi/Makefile3
-rw-r--r--x11/rofi/files/patch-source_i3-support.c24
2 files changed, 26 insertions, 1 deletions
diff --git a/x11/rofi/Makefile b/x11/rofi/Makefile
index fe2203a1054d..60cd17824ec9 100644
--- a/x11/rofi/Makefile
+++ b/x11/rofi/Makefile
@@ -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
diff --git a/x11/rofi/files/patch-source_i3-support.c b/x11/rofi/files/patch-source_i3-support.c
new file mode 100644
index 000000000000..e9012e3caf1a
--- /dev/null
+++ b/x11/rofi/files/patch-source_i3-support.c
@@ -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;