From 98260975c0125e6c7595d684f37aba522080ee8b Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 16 May 2022 19:21:27 +0430 Subject: [PATCH] Ports: Update SDL2_net's patches to use git patches --- ...001-Undefine-SIOCGIFCONF-on-serenity.patch | 28 +++++++++++++++++++ .../patches/0002-Include-sys-select.h.patch | 24 ++++++++++++++++ Ports/SDL2_net/patches/ReadMe.md | 13 +++++++++ Ports/SDL2_net/patches/ifconf.patch | 14 ---------- Ports/SDL2_net/patches/select.patch | 11 -------- 5 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 Ports/SDL2_net/patches/0001-Undefine-SIOCGIFCONF-on-serenity.patch create mode 100644 Ports/SDL2_net/patches/0002-Include-sys-select.h.patch create mode 100644 Ports/SDL2_net/patches/ReadMe.md delete mode 100644 Ports/SDL2_net/patches/ifconf.patch delete mode 100644 Ports/SDL2_net/patches/select.patch diff --git a/Ports/SDL2_net/patches/0001-Undefine-SIOCGIFCONF-on-serenity.patch b/Ports/SDL2_net/patches/0001-Undefine-SIOCGIFCONF-on-serenity.patch new file mode 100644 index 0000000000..b9a96c3b58 --- /dev/null +++ b/Ports/SDL2_net/patches/0001-Undefine-SIOCGIFCONF-on-serenity.patch @@ -0,0 +1,28 @@ +From 39364e14fd4259ab6c618a228f0b06dc8b9af24b Mon Sep 17 00:00:00 2001 +From: Gunnar Beutner +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 + diff --git a/Ports/SDL2_net/patches/0002-Include-sys-select.h.patch b/Ports/SDL2_net/patches/0002-Include-sys-select.h.patch new file mode 100644 index 0000000000..a810d42c61 --- /dev/null +++ b/Ports/SDL2_net/patches/0002-Include-sys-select.h.patch @@ -0,0 +1,24 @@ +From 5827fd456bcd7747fca2bb4f447c59ce7886a061 Mon Sep 17 00:00:00 2001 +From: Gunnar Beutner +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 + #else /* UNIX */ + #include ++#include + #ifdef __FreeBSD__ + #include + #endif +-- +2.36.1 + diff --git a/Ports/SDL2_net/patches/ReadMe.md b/Ports/SDL2_net/patches/ReadMe.md new file mode 100644 index 0000000000..2f08b6fd38 --- /dev/null +++ b/Ports/SDL2_net/patches/ReadMe.md @@ -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 + + diff --git a/Ports/SDL2_net/patches/ifconf.patch b/Ports/SDL2_net/patches/ifconf.patch deleted file mode 100644 index 78c11e1e27..0000000000 --- a/Ports/SDL2_net/patches/ifconf.patch +++ /dev/null @@ -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; diff --git a/Ports/SDL2_net/patches/select.patch b/Ports/SDL2_net/patches/select.patch deleted file mode 100644 index 997b0f0a92..0000000000 --- a/Ports/SDL2_net/patches/select.patch +++ /dev/null @@ -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 - #else /* UNIX */ - #include -+#include - #ifdef __FreeBSD__ - #include - #endif