mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:57:45 +00:00
Ports: Update libpuffy's patches to use git patches
This commit is contained in:
parent
6c2009f915
commit
b97b6bd348
3 changed files with 37 additions and 17 deletions
30
Ports/libpuffy/patches/0001-Add-a-definition-for-llabs.patch
Normal file
30
Ports/libpuffy/patches/0001-Add-a-definition-for-llabs.patch
Normal 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
|
||||||
|
|
7
Ports/libpuffy/patches/ReadMe.md
Normal file
7
Ports/libpuffy/patches/ReadMe.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Patches for libpuffy on SerenityOS
|
||||||
|
|
||||||
|
## `0001-Add-a-definition-for-llabs.patch`
|
||||||
|
|
||||||
|
Add a definition for llabs
|
||||||
|
|
||||||
|
|
|
@ -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.
|
|
Loading…
Add table
Add a link
Reference in a new issue