0
0
mirror of https://github.com/openwrt/packages.git synced 2025-07-20 11:21:49 +00:00
Files
packages/net/mptcpd/patches/140-no-error-h.patch
Daniel Golle d6908b2c5d mptcpd: add package
Package Multipath TCP daemon (mptcpd) and wrapper (mptcpize).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-26 19:20:18 +01:00

31 lines
671 B
Diff

--- a/src/mptcpize.c
+++ b/src/mptcpize.c
@@ -18,7 +18,7 @@
#include <argp.h>
#include <dlfcn.h>
#include <errno.h>
-#include <error.h>
+//#include <error.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -36,6 +36,18 @@
#define PRELOAD_VAR "LD_PRELOAD="
#define MPTCPWRAP_ENV "LD_PRELOAD="PKGLIBDIR"/libmptcpwrap.so.0.0."LIBREVISION
+#define error(status, errnum, fmt, ...) do { \
+ if (errnum) { \
+ errno = errnum; \
+ perror(fmt); \
+ } else { \
+ fprintf(stderr, "%s\n", fmt); \
+ } \
+ if (status) \
+ exit(status); \
+} while(0)
+
+
/* Program documentation. */
static char args_doc[] = "CMD";