$OpenBSD: patch-src_utmp_c,v 1.1 2017/05/04 13:55:32 espie Exp $

Index: src/utmp.c
--- src/utmp.c.orig
+++ src/utmp.c
@@ -54,6 +54,7 @@
 #include <pwd.h>
 #include <string.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <memory.h>
 #include <signal.h>
 
@@ -172,7 +173,7 @@ int     write_utmp(char *ttyname, struct utmp *u)
     FILE   *utmp;
 
     if (no_utmp)
-	return;
+	return -1;
     if ((utmp = fopen(UTMP, "r+")) == NULL)
 	return -1;
     utmp_pos = get_tslot(ttyname) * sizeof(struct utmp);
