From 37b879f4adcee8c7ab360512487ab617211a4e2a Mon Sep 17 00:00:00 2001
From: Orestis Floros <orestisf1993@gmail.com>
Date: Mon, 27 Aug 2018 22:19:36 +0300
Subject: [PATCH] ipc_client_timeout: Fix build when not on linux

Also moved the 'end' label because it is unused otherwise.

Reported here: https://github.com/Airblader/i3/issues/233
---
 src/ipc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/ipc.c b/src/ipc.c
index 977fe377..3022d5b3 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1414,12 +1414,14 @@ static void ipc_client_timeout(EV_P_ ev_timer *w, int revents) {
         }
     }
     cmdline = buf;
-#endif
 
-end:
     if (cmdline) {
         ELOG("client %p with pid %d and cmdline '%s' on fd %d timed out, killing\n", client, peercred.pid, cmdline, client->fd);
-    } else {
+    }
+
+end:
+#endif
+    if (!cmdline) {
         ELOG("client %p on fd %d timed out, killing\n", client, client->fd);
     }