From 7cd34a216c356e454c47691c8b9649b1e04275fe Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 31 Mar 2019 12:18:46 +0200
Subject: sys/fcntl.h doesn't exit on Haiku. fcntl.h does.


diff --git a/joe/util/checkwidths.c b/joe/util/checkwidths.c
index 509447d..984785b 100644
--- a/joe/util/checkwidths.c
+++ b/joe/util/checkwidths.c
@@ -12,7 +12,7 @@
 #include <arpa/inet.h>
 #include <stddef.h>
 #include <poll.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <termios.h>
 
 #define TO_CHAR_OK(c) ((char)(c))
-- 
2.19.1


From b3a1b477920232a9a354f1bc6bbe7e154b0cfbc9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 31 Mar 2019 12:59:48 +0200
Subject: gcc2 patch


diff --git a/joe/bw.c b/joe/bw.c
index 66594b8..fcbc3db 100644
--- a/joe/bw.c
+++ b/joe/bw.c
@@ -1227,8 +1227,8 @@ int ucrawll(W *w, int k)
 {
 	BW *bw;
 	off_t amnt;
-	WIND_BW(bw, w);
 	int rtn = -1;
+	WIND_BW(bw, w);
 
 	if (opt_left < 0)
 		amnt = bw->w / (-opt_left);
-- 
2.19.1

