Skip to content

Commit

Permalink
Add SOMAXCONN definition if missing in enet patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Jun 10, 2024
1 parent 85f408a commit 2145b85
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
5 changes: 4 additions & 1 deletion enet/VITABUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pkgrel=1
url="https://github.com/lsalzman/enet"
source=("https://github.com/lsalzman/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz" "enet.patch")
sha256sums=('28603c895f9ed24a846478180ee72c7376b39b4bb1287b73877e5eae7d96b0dd'
'b88e1b046c24fef1211e6227ccb1ab45e17f079cd23e87094abc6171bd38595d')
'0b6d59e7eef42914d6f90fa3da87ff13182a39455a729c5490342bbf0ce16490')

build() {
cd $pkgname-$pkgver
Expand All @@ -14,6 +14,9 @@ build() {
}

package () {
mkdir -p $pkgdir/$VITASDK/arm-vita-eabi/lib
mkdir -p $pkgdir/$VITASDK/arm-vita-eabi/include

cd $pkgname-$pkgver
cp lib$pkgname.a $pkgdir/$VITASDK/arm-vita-eabi/lib/
cp include/$pkgname $pkgdir/$VITASDK/arm-vita-eabi/include/
Expand Down
15 changes: 13 additions & 2 deletions enet/enet.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- unix.c 2024-04-15 05:06:53.000000000 +0200
+++ unix.c 2024-06-09 13:46:43.009847600 +0200
+++ unix.c 2024-06-09 18:33:00.241853200 +0200
@@ -6,7 +6,9 @@

#include <sys/types.h>
Expand All @@ -10,7 +10,18 @@
#include <sys/time.h>
#include <netinet/tcp.h>
#include <netdb.h>
@@ -303,11 +305,15 @@
@@ -61,6 +63,10 @@
#define MSG_NOSIGNAL 0
#endif

+#ifndef SOMAXCONN
+#define SOMAXCONN 128
+#endif
+
static enet_uint32 timeBase = 0;

int
@@ -303,11 +309,15 @@
switch (option)
{
case ENET_SOCKOPT_NONBLOCK:
Expand Down

0 comments on commit 2145b85

Please sign in to comment.