void-packages/srcpkgs/bro/patches/musl.patch

75 lines
1.4 KiB
Diff

https://github.com/danielguerra69/docker-bro-1
--- aux/binpac/lib/binpac.h.in.orig
+++ aux/binpac/lib/binpac.h.in
@@ -4,6 +4,7 @@
#define binpac_h
#include <sys/param.h>
+#include <sys/types.h>
#cmakedefine HOST_BIGENDIAN
#ifdef HOST_BIGENDIAN
--- src/OSFinger.h.orig
+++ src/OSFinger.h
@@ -166,3 +166,57 @@
#define MATCHFUZZY 0x2
#endif
+
+// For musl-libc
+#ifndef TCPOPT_EOL
+# define TCPOPT_EOL 0
+#endif
+
+#ifndef TCPOPT_NOP
+# define TCPOPT_NOP 1
+#endif
+
+#ifndef TCPOPT_MAXSEG
+# define TCPOPT_MAXSEG 2
+#endif
+
+#ifndef TCPOLEN_MAXSEG
+# define TCPOLEN_MAXSEG 4
+#endif
+
+#ifndef TCPOPT_WINDOW
+# define TCPOPT_WINDOW 3
+#endif
+
+#ifndef TCPOLEN_WINDOW
+# define TCPOLEN_WINDOW 3
+#endif
+
+#ifndef TCPOPT_SACK_PERMITTED
+# define TCPOPT_SACK_PERMITTED 4 /* Experimental */
+#endif
+
+#ifndef TCPOLEN_SACK_PERMITTED
+# define TCPOLEN_SACK_PERMITTED 2
+#endif
+
+#ifndef TCPOPT_SACK
+# define TCPOPT_SACK 5 /* Experimental */
+#endif
+
+#ifndef TCPOPT_TIMESTAMP
+# define TCPOPT_TIMESTAMP 8
+#endif
+
+#ifndef TCPOLEN_TIMESTAMP
+# define TCPOLEN_TIMESTAMP 10
+#endif
+
+#ifndef TCPOLEN_TSTAMP_APPA
+# define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
+#endif
+
+#ifndef TCPOPT_TSTAMP_HDR
+# define TCPOPT_TSTAMP_HDR \
+ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+#endif