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 427c02f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 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 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 427c02f

Please sign in to comment.