Ports: Update libpuffy's patches to use git patches

This commit is contained in:
Ali Mohammad Pur 2022-05-16 19:21:52 +04:30 committed by Ali Mohammad Pur
parent 6c2009f915
commit b97b6bd348
Notes: sideshowbarker 2024-07-19 01:59:31 +09:00
3 changed files with 37 additions and 17 deletions

View File

@ -0,0 +1,30 @@
From 806cad445d82dd4facb0759087881dc6d6a0ec70 Mon Sep 17 00:00:00 2001
From: Gunnar Beutner <gbeutner@serenityos.org>
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

View File

@ -0,0 +1,7 @@
# Patches for libpuffy on SerenityOS
## `0001-Add-a-definition-for-llabs.patch`
Add a definition for llabs

View File

@ -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.