From 339e6c43575244f72831654e5dda41c037febde7 Mon Sep 17 00:00:00 2001
From: Klemens Nanni <kn@openbsd.org>
Date: Thu, 2 Apr 2020 18:19:57 +0200
Subject: [PATCH] Include <errno.h> for global errno

At least on OpenBSD the symbol `errno` is otherwise not defined;  it is
used in the `SSO()` macro and `send_authorized_keys()` function.
---
 tmate-session.c    | 1 +
 tmate-ssh-client.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tmate-session.c b/tmate-session.c
index 624932781..5ba0896cb 100644
--- a/tmate-session.c
+++ b/tmate-session.c
@@ -5,6 +5,7 @@
 #include <netinet/in.h>
 #include <sys/socket.h>
 
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c
index c52c166c1..42c4e6a6f 100644
--- a/tmate-ssh-client.c
+++ b/tmate-ssh-client.c
@@ -1,6 +1,7 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <event.h>
