mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update mptcpd
This commit is contained in:
parent
a614a47da2
commit
2c57ab4d43
2 changed files with 23 additions and 3 deletions
19
mptcpd/patches/endian.patch
Normal file
19
mptcpd/patches/endian.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- a/include/mptcpd/private/sockaddr.h 2022-07-24 18:29:37.995613204 +0200
|
||||
+++ b/include/mptcpd/private/sockaddr.h 2022-07-24 18:30:53.802312010 +0200
|
||||
@@ -24,6 +24,16 @@
|
||||
* These macros may be used in place of @c htons() or @c htonl() when
|
||||
* initializing an IPv4 address or IP port constant at compile-time.
|
||||
*/
|
||||
+#ifndef __bswap_constant_16
|
||||
+#define __bswap_constant_16(x) \
|
||||
+ ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
|
||||
+#endif
|
||||
+#ifndef __bswap_constant_32
|
||||
+#define __bswap_constant_32(x) \
|
||||
+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \
|
||||
+ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
|
||||
+#endif
|
||||
+
|
||||
///@{
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define MPTCPD_CONSTANT_HTONS(hs) __bswap_constant_16(hs)
|
Loading…
Add table
Add a link
Reference in a new issue