mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
Ports: Update SDL2_net's patches to use git patches
This commit is contained in:
parent
7574dc0258
commit
98260975c0
5 changed files with 65 additions and 25 deletions
|
@ -0,0 +1,28 @@
|
||||||
|
From 39364e14fd4259ab6c618a228f0b06dc8b9af24b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
|
Date: Wed, 16 Jun 2021 11:08:32 +0200
|
||||||
|
Subject: [PATCH 1/2] Undefine 'SIOCGIFCONF' on serenity
|
||||||
|
|
||||||
|
FIXME: We don't know why yet.
|
||||||
|
---
|
||||||
|
SDLnet.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/SDLnet.c b/SDLnet.c
|
||||||
|
index 53d125a..87eab4c 100644
|
||||||
|
--- a/SDLnet.c
|
||||||
|
+++ b/SDLnet.c
|
||||||
|
@@ -184,6 +184,10 @@ const char *SDLNet_ResolveIP(const IPaddress *ip)
|
||||||
|
return inet_ntoa(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef __serenity__
|
||||||
|
+#undef SIOCGIFCONF
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
int SDLNet_GetLocalAddresses(IPaddress *addresses, int maxcount)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
24
Ports/SDL2_net/patches/0002-Include-sys-select.h.patch
Normal file
24
Ports/SDL2_net/patches/0002-Include-sys-select.h.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
From 5827fd456bcd7747fca2bb4f447c59ce7886a061 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||||
|
Date: Wed, 16 Jun 2021 11:08:32 +0200
|
||||||
|
Subject: [PATCH 2/2] Include sys/select.h
|
||||||
|
|
||||||
|
---
|
||||||
|
SDLnetsys.h | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/SDLnetsys.h b/SDLnetsys.h
|
||||||
|
index 6f6dfae..bd9139d 100644
|
||||||
|
--- a/SDLnetsys.h
|
||||||
|
+++ b/SDLnetsys.h
|
||||||
|
@@ -46,6 +46,7 @@ typedef int socklen_t;
|
||||||
|
#include <iphlpapi.h>
|
||||||
|
#else /* UNIX */
|
||||||
|
#include <sys/types.h>
|
||||||
|
+#include <sys/select.h>
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
13
Ports/SDL2_net/patches/ReadMe.md
Normal file
13
Ports/SDL2_net/patches/ReadMe.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Patches for SDL2_net on SerenityOS
|
||||||
|
|
||||||
|
## `0001-Undefine-SIOCGIFCONF-on-serenity.patch`
|
||||||
|
|
||||||
|
Undefine 'SIOCGIFCONF' on serenity
|
||||||
|
|
||||||
|
FIXME: We don't know why yet.
|
||||||
|
|
||||||
|
## `0002-Include-sys-select.h.patch`
|
||||||
|
|
||||||
|
Include sys/select.h
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
diff -Naur SDL2_net-2.0.1/SDLnet.c SDL2_net-2.0.1.serenity/SDLnet.c
|
|
||||||
--- SDL2_net-2.0.1/SDLnet.c 2016-01-03 08:57:09.000000000 +0100
|
|
||||||
+++ SDL2_net-2.0.1.serenity/SDLnet.c 2021-06-16 10:48:32.073734588 +0200
|
|
||||||
@@ -184,6 +184,10 @@
|
|
||||||
return inet_ntoa(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#ifdef __serenity__
|
|
||||||
+#undef SIOCGIFCONF
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
int SDLNet_GetLocalAddresses(IPaddress *addresses, int maxcount)
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
|
@ -1,11 +0,0 @@
|
||||||
diff -Naur SDL2_net-2.0.1/SDLnetsys.h SDL2_net-2.0.1.serenity/SDLnetsys.h
|
|
||||||
--- SDL2_net-2.0.1/SDLnetsys.h 2021-06-16 10:42:24.609750625 +0200
|
|
||||||
+++ SDL2_net-2.0.1.serenity/SDLnetsys.h 2016-01-03 08:57:09.000000000 +0100
|
|
||||||
@@ -46,6 +46,7 @@
|
|
||||||
#include <iphlpapi.h>
|
|
||||||
#else /* UNIX */
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#include <sys/select.h>
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#endif
|
|
Loading…
Add table
Add a link
Reference in a new issue