ladybird/Ports/cfunge/patches/0002-Define-MAX-inline-instead-of-using-sys-param.h.patch

22 lines
819 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tobias Christiansen <tobyase@serenityos.org>
Date: Thu, 24 Mar 2022 15:41:48 +0100
Subject: [PATCH] Define MAX inline instead of using sys/param.h
---
lib/fungestring/funge_str-two-way.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fungestring/funge_str-two-way.h b/lib/fungestring/funge_str-two-way.h
index 70295f4..a3e0888 100644
--- a/lib/fungestring/funge_str-two-way.h
+++ b/lib/fungestring/funge_str-two-way.h
@@ -53,7 +53,7 @@
#include <limits.h>
#include <stdint.h>
-#include <sys/param.h> /* Defines MAX. */
+#define MAX(a,b) (((a)>(b))?(a):(b))
/* We use the Two-Way string matching algorithm, which guarantees
linear complexity with constant space. Additionally, for long