1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 02:51:50 +00:00
openmptcprouter-feeds/mptcpd/patches/stub_error_h.patch
2022-05-20 16:49:04 +02:00

16 lines
373 B
Diff

--- a/src/error.h
+++ b/src/error.h
@@ -0,0 +1,13 @@
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#include <stdio.h>
+#include <stdlib.h>
+
+// mimic the behaviour of https://man7.org/linux/man-pages/man3/error.3.html
+void error(int status, int errnum, const char *format, ...)
+{
+ fprintf(stderr, "Error %d: %s", errnum, format);
+ if (status != 0) exit(status);
+}
+#endif