You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

117 lines
4.1 KiB

Index: srtcore/api.h
--- srtcore/api.h.orig 2020-09-25 13:58:07.000000000 +0200
+++ srtcore/api.h 2020-11-12 19:52:21.400337000 +0100
@@ -65,7 +65,7 @@
#include "epoll.h"
#include "handshake.h"
#include "core.h"
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
#include "group.h"
#endif
@@ -80,7 +80,7 @@
, m_SocketID(0)
, m_ListenSocket(0)
, m_PeerID(0)
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
, m_IncludedGroup()
#endif
, m_iISN(0)
@@ -115,7 +115,7 @@
SRTSOCKET m_ListenSocket; //< ID of the listener socket; 0 means this is an independent socket
SRTSOCKET m_PeerID; //< peer socket ID
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
CUDTGroup::gli_t m_IncludedIter; //< Container's iterator of the group to which it belongs, or gli_NULL() if it isn't
CUDTGroup* m_IncludedGroup; //< Group this socket is a member of, or NULL if it isn't
#endif
@@ -245,7 +245,7 @@
int connect(SRTSOCKET u, const sockaddr* srcname, const sockaddr* tarname, int tarlen);
int connect(const SRTSOCKET u, const sockaddr* name, int namelen, int32_t forced_isn);
int connectIn(CUDTSocket* s, const sockaddr_any& target, int32_t forced_isn);
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
int groupConnect(CUDTGroup* g, SRT_SOCKGROUPCONFIG targets [], int arraysize);
int singleMemberConnect(CUDTGroup* g, SRT_SOCKGROUPCONFIG* target);
#endif
@@ -268,7 +268,7 @@
int32_t epoll_set(const int eid, int32_t flags);
int epoll_release(const int eid);
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
CUDTGroup& addGroup(SRTSOCKET id, SRT_GROUP_TYPE type)
{
srt::sync::ScopedLock cg (m_GlobControlLock);
@@ -348,7 +348,7 @@
typedef std::map<SRTSOCKET, CUDTSocket*> sockets_t; // stores all the socket structures
sockets_t m_Sockets;
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
typedef std::map<SRTSOCKET, CUDTGroup*> groups_t;
groups_t m_Groups;
#endif
@@ -369,7 +369,7 @@
CUDTSocket* locateSocket(SRTSOCKET u, ErrorHandling erh = ERH_RETURN);
CUDTSocket* locatePeer(const sockaddr_any& peer, const SRTSOCKET id, int32_t isn);
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
CUDTGroup* locateGroup(SRTSOCKET u, ErrorHandling erh = ERH_RETURN);
#endif
void updateMux(CUDTSocket* s, const sockaddr_any& addr, const UDPSOCKET* = NULL);
Index: srtcore/platform_sys.h
--- srtcore/platform_sys.h.orig 2020-09-25 13:58:07.000000000 +0200
+++ srtcore/platform_sys.h 2020-11-12 19:51:46.976786000 +0100
@@ -45,7 +45,7 @@
#endif
#else
-#if __APPLE__
+#ifdef __APPLE__
// XXX Check if this condition doesn't require checking of
// also other macros, like TARGET_OS_IOS etc.
@@ -59,6 +59,17 @@
#ifdef SRT_IMPORT_EVENT
#include <sys/types.h>
+ #include <sys/event.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+#endif
+
+#endif
+
+#ifdef BSD
+
+#ifdef SRT_IMPORT_EVENT
+ #include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <unistd.h>
Index: srtcore/srt.h
--- srtcore/srt.h.orig 2020-09-25 13:58:07.000000000 +0200
+++ srtcore/srt.h 2020-11-12 19:52:41.591381000 +0100
@@ -235,7 +235,7 @@
SRTO_ENFORCEDENCRYPTION, // Connection to be rejected or quickly broken when one side encryption set or bad password
SRTO_IPV6ONLY, // IPV6_V6ONLY mode
SRTO_PEERIDLETIMEO, // Peer-idle timeout (max time of silence heard from peer) in [ms]
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
SRTO_GROUPCONNECT, // Set on a listener to allow group connection
SRTO_GROUPSTABTIMEO, // Stability timeout (backup groups) in [us]
SRTO_GROUPTYPE, // Group type to which an accepted socket is about to be added, available in the handshake
@@ -760,7 +760,7 @@
typedef struct SRT_SocketGroupData_ SRT_SOCKGROUPDATA;
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
typedef enum SRT_GROUP_TYPE
{