1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Description: Enable SIOCOUTQ via TIOCOUTQ
So it's enabled on all archs, not just alpha/hppa/sparc
Author: IOhannes m zmölnig
Origin: upstream
Applied-Upstream: https://github.com/pd-externals/mrpeach/commit/1bdf90625dd3436d72a4473a476ddee0739f6307
Last-Update: 2024-10-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-mrpeach.orig/net/tcpserver.c
+++ pd-mrpeach/net/tcpserver.c
@@ -68,6 +68,10 @@
#define INBUFSIZE 65536L /* was 4096: size of receiving data buffer */
#define MAX_UDP_RECEIVE 65536L /* longer than data in maximum UDP packet */
+#if defined TIOCOUTQ && !defined SIOCOUTQ
+# define SIOCOUTQ TIOCOUTQ
+#endif
+
/* ----------------------------- tcpserver ------------------------- */
static t_class *tcpserver_class;
@@ -539,7 +543,7 @@
/* SIOCOUTQ exists only(?) on linux, returns remaining space in the socket's output buffer */
static int tcpserver_send_buffer_avaliable_for_client(t_tcpserver *x, int client)
{
- int sockfd = x->x_sr[client].sr_fd;
+ int sockfd = x->x_sr[client]->sr_fd;
int result = 0L;
ioctl(sockfd, SIOCOUTQ, &result);
|