diff --git a/Ports/libpuffy/patches/0001-Add-a-definition-for-llabs.patch b/Ports/libpuffy/patches/0001-Add-a-definition-for-llabs.patch new file mode 100644 index 00000000000..2454a720bf2 --- /dev/null +++ b/Ports/libpuffy/patches/0001-Add-a-definition-for-llabs.patch @@ -0,0 +1,30 @@ +From 806cad445d82dd4facb0759087881dc6d6a0ec70 Mon Sep 17 00:00:00 2001 +From: Gunnar Beutner +Date: Sat, 1 May 2021 22:43:05 +0200 +Subject: [PATCH] Add a definition for llabs + +--- + fmt_scaled.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/fmt_scaled.c b/fmt_scaled.c +index 6ad314e..6e68356 100644 +--- a/fmt_scaled.c ++++ b/fmt_scaled.c +@@ -207,11 +207,13 @@ scan_scaled(char *scaled, long long *result) + return -1; + } + ++#ifndef __serenity__ + static long long + llabs(long long j) + { + return (j < 0 ? -j : j); + } ++#endif + + /* Format the given "number" into human-readable form in "result". + * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE. +-- +2.36.1 + diff --git a/Ports/libpuffy/patches/ReadMe.md b/Ports/libpuffy/patches/ReadMe.md new file mode 100644 index 00000000000..ddd22a3bf41 --- /dev/null +++ b/Ports/libpuffy/patches/ReadMe.md @@ -0,0 +1,7 @@ +# Patches for libpuffy on SerenityOS + +## `0001-Add-a-definition-for-llabs.patch` + +Add a definition for llabs + + diff --git a/Ports/libpuffy/patches/llabs.patch b/Ports/libpuffy/patches/llabs.patch deleted file mode 100644 index 518fdaa0e47..00000000000 --- a/Ports/libpuffy/patches/llabs.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -Naur libpuffy-1.0/fmt_scaled.c libpuffy-1.0.serenity/fmt_scaled.c ---- libpuffy-1.0/fmt_scaled.c 2020-03-14 21:04:34.000000000 +0100 -+++ libpuffy-1.0.serenity/fmt_scaled.c 2021-05-01 22:39:53.429380002 +0200 -@@ -207,11 +207,13 @@ - return -1; - } - -+#ifndef __serenity__ - static long long - llabs(long long j) - { - return (j < 0 ? -j : j); - } -+#endif - - /* Format the given "number" into human-readable form in "result". - * Result must point to an allocated buffer of length FMT_SCALED_STRSIZE.