mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
Ports: Update emu2's patches to use git patches
This commit is contained in:
parent
f5a4d529c2
commit
1b5389ea81
8 changed files with 125 additions and 43 deletions
24
Ports/emu2/patches/0001-Include-strings.h.patch
Normal file
24
Ports/emu2/patches/0001-Include-strings.h.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 0e8dbc3e4e44760da5817053eb2a9f6f2f55245b Mon Sep 17 00:00:00 2001
|
||||
From: Brendan Coles <bcoles@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 17:24:58 +0000
|
||||
Subject: [PATCH 1/4] Include <strings.h>
|
||||
|
||||
---
|
||||
src/codepage.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/codepage.c b/src/codepage.c
|
||||
index 3916b61..9df0bd8 100644
|
||||
--- a/src/codepage.c
|
||||
+++ b/src/codepage.c
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "env.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
|
||||
/* List of code-pages */
|
||||
struct cp_data
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 35566f37112c812ab3695e4843ff653792b1d532 Mon Sep 17 00:00:00 2001
|
||||
From: Brendan Coles <bcoles@gmail.com>
|
||||
Date: Thu, 23 Dec 2021 10:26:29 +0100
|
||||
Subject: [PATCH 2/4] Replace a use of rindex() with strrchr()
|
||||
|
||||
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
|
||||
---
|
||||
src/dosnames.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/dosnames.c b/src/dosnames.c
|
||||
index b6122a9..582a0e2 100644
|
||||
--- a/src/dosnames.c
|
||||
+++ b/src/dosnames.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
// DOS directory entries.
|
||||
@@ -589,7 +590,7 @@ char *dos_unix_path_fcb(int addr, int force)
|
||||
static struct dos_file_list *find_first_file(char *fspec)
|
||||
{
|
||||
// Now, separate the path to the spec
|
||||
- char *glob, *unixpath, *p = rindex(fspec, '/');
|
||||
+ char *glob, *unixpath, *p = strrchr(fspec, '/');
|
||||
if(!p)
|
||||
{
|
||||
glob = fspec;
|
||||
--
|
||||
2.36.1
|
||||
|
25
Ports/emu2/patches/0003-Install-into-usr-local.patch
Normal file
25
Ports/emu2/patches/0003-Install-into-usr-local.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From 83c869b96b9651ff4fc16989cffb9a27d21329b2 Mon Sep 17 00:00:00 2001
|
||||
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||
Date: Thu, 15 Apr 2021 15:43:18 +0200
|
||||
Subject: [PATCH 3/4] Install into /usr/local
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 80dd6ec..7026600 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -2,7 +2,7 @@ CC=gcc
|
||||
CFLAGS=-O3 -flto -Wall -g -Werror=implicit-function-declaration -Werror=int-conversion
|
||||
LDLIBS=-lm
|
||||
INSTALL=install
|
||||
-PREFIX=/usr
|
||||
+PREFIX=/usr/local
|
||||
|
||||
OBJS=\
|
||||
cpu.o\
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -1,6 +1,17 @@
|
|||
diff -ur a/src/main.c b/src/main.c
|
||||
--- a/src/main.c 2022-01-07 14:27:34.882469924 +0100
|
||||
+++ b/src/main.c 2022-01-07 17:25:14.828001662 +0100
|
||||
From 9dec9f5ffc1a75ab15d4ecec19cb03fa4792b31d Mon Sep 17 00:00:00 2001
|
||||
From: Brendan Coles <bcoles@gmail.com>
|
||||
Date: Fri, 7 Jan 2022 17:26:40 +0100
|
||||
Subject: [PATCH 4/4] Don't use setitimer()
|
||||
|
||||
Co-Authored-By: Tim Schumacher <timschumi@gmx.de>
|
||||
---
|
||||
src/main.c | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index d0c0d2f..7e313a0 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -9,7 +20,7 @@ diff -ur a/src/main.c b/src/main.c
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -304,12 +304,6 @@
|
||||
@@ -304,12 +305,6 @@ int main(int argc, char **argv)
|
||||
signal(SIGQUIT, exit_handler);
|
||||
signal(SIGPIPE, exit_handler);
|
||||
signal(SIGTERM, exit_handler);
|
||||
|
@ -22,3 +33,6 @@ diff -ur a/src/main.c b/src/main.c
|
|||
init_bios_mem();
|
||||
while(1)
|
||||
{
|
||||
--
|
||||
2.36.1
|
||||
|
24
Ports/emu2/patches/ReadMe.md
Normal file
24
Ports/emu2/patches/ReadMe.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Patches for emu2 on SerenityOS
|
||||
|
||||
## `0001-Include-strings.h.patch`
|
||||
|
||||
Include <strings.h>
|
||||
|
||||
|
||||
## `0002-Replace-a-use-of-rindex-with-strrchr.patch`
|
||||
|
||||
Replace a use of rindex() with strrchr()
|
||||
|
||||
|
||||
|
||||
## `0003-Install-into-usr-local.patch`
|
||||
|
||||
Install into /usr/local
|
||||
|
||||
|
||||
## `0004-Don-t-use-setitimer.patch`
|
||||
|
||||
Don't use setitimer()
|
||||
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
+++ emu2-master/src/codepage.c 2021-04-14 07:13:48.165698165 -0700
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "env.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
|
||||
/* List of code-pages */
|
||||
struct cp_data
|
|
@ -1,18 +0,0 @@
|
|||
+++ emu2-master/src/dosnames.c 2021-04-14 07:15:44.036839086 -0700
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <strings.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
// DOS directory entries.
|
||||
@@ -589,7 +590,7 @@
|
||||
static struct dos_file_list *find_first_file(char *fspec)
|
||||
{
|
||||
// Now, separate the path to the spec
|
||||
- char *glob, *unixpath, *p = rindex(fspec, '/');
|
||||
+ char *glob, *unixpath, *p = strrchr(fspec, '/');
|
||||
if(!p)
|
||||
{
|
||||
glob = fspec;
|
|
@ -1,12 +0,0 @@
|
|||
diff -Naur emu2-ff276eb0a755a3e784f73da00b5db6c1b25c1f83/Makefile emu2-ff276eb0a755a3e784f73da00b5db6c1b25c1f83.serenity/Makefile
|
||||
--- emu2-ff276eb0a755a3e784f73da00b5db6c1b25c1f83/Makefile 2021-04-14 15:58:46.000000000 +0200
|
||||
+++ emu2-ff276eb0a755a3e784f73da00b5db6c1b25c1f83.serenity/Makefile 2021-04-16 00:42:15.680769941 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
CFLAGS=-O3 -flto -Wall -g -Werror=implicit-function-declaration -Werror=int-conversion
|
||||
LDLIBS=-lm
|
||||
INSTALL=install
|
||||
-PREFIX=/usr
|
||||
+PREFIX=/usr/local
|
||||
|
||||
OBJS=\
|
||||
cpu.o\
|
Loading…
Add table
Add a link
Reference in a new issue