termux-packages/disabled-packages/moc/sun_len-def.patch
Leonid Pliushch 17acc4a871 add moc as disabled package
Requested in https://github.com/termux/termux-packages/issues/1637.

Package seems does not support PulseAudio which is required
for sound output in Termux.
2020-01-02 16:08:27 +02:00

31 lines
898 B
Diff

diff -uNr moc-2.5.2/main.c moc-2.5.2.mod/main.c
--- moc-2.5.2/main.c 2016-11-16 02:54:37.000000000 +0200
+++ moc-2.5.2.mod/main.c 2020-01-02 16:01:04.339045422 +0200
@@ -46,6 +46,11 @@
#include "files.h"
#include "rcc.h"
+#ifndef SUN_LEN
+# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
+
struct parameters
{
char *config_file;
diff -uNr moc-2.5.2/server.c moc-2.5.2.mod/server.c
--- moc-2.5.2/server.c 2016-11-16 02:54:37.000000000 +0200
+++ moc-2.5.2.mod/server.c 2020-01-02 16:00:50.770930819 +0200
@@ -52,6 +52,11 @@
#define SERVER_LOG "mocp_server_log"
#define PID_FILE "pid"
+#ifndef SUN_LEN
+# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+ + strlen ((ptr)->sun_path))
+#endif
+
struct client
{
int socket; /* -1 if inactive */