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.
 
 
 
 
 
 

126 lines
4.0 KiB

Index: srtcore/api.h
--- srtcore/api.h.orig 2021-04-27 10:44:11.000000000 +0200
+++ srtcore/api.h 2021-04-27 23:49:19.826897000 +0200
@@ -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
@@ -82,7 +82,7 @@
, m_SocketID(0)
, m_ListenSocket(0)
, m_PeerID(0)
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
, m_GroupMemberData()
, m_GroupOf()
#endif
@@ -116,7 +116,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
srt::groups::SocketData* m_GroupMemberData; //< Pointer to group member data, or NULL if not a group member
CUDTGroup* m_GroupOf; //< Group this socket is a member of, or NULL if it isn't
#endif
@@ -256,7 +256,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
@@ -275,7 +275,7 @@
template <class EntityType>
int epoll_remove_entity(const int eid, EntityType* ent);
int epoll_remove_socket_INTERNAL(const int eid, CUDTSocket* ent);
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
int epoll_remove_group_INTERNAL(const int eid, CUDTGroup* ent);
#endif
int epoll_remove_ssock(const int eid, const SYSSOCKET s);
@@ -284,7 +284,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
// [[using locked(m_GlobControlLock)]]
CUDTGroup& addGroup(SRTSOCKET id, SRT_GROUP_TYPE type)
{
@@ -341,7 +341,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
@@ -365,7 +365,7 @@
CUDTSocket* locateSocket_LOCKED(SRTSOCKET u);
CUDTSocket* locatePeer(const sockaddr_any& peer, const SRTSOCKET id, int32_t isn);
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
CUDTGroup* locateAcquireGroup(SRTSOCKET u, ErrorHandling erh = ERH_RETURN);
CUDTGroup* acquireSocketsGroup(CUDTSocket* s);
@@ -426,7 +426,7 @@
static void* garbageCollect(void*);
sockets_t m_ClosedSockets; // temporarily store closed sockets
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
groups_t m_ClosedGroups;
#endif
Index: srtcore/platform_sys.h
--- srtcore/platform_sys.h.orig 2021-04-27 10:44:11.000000000 +0200
+++ srtcore/platform_sys.h 2021-04-27 23:47:10.900554000 +0200
@@ -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.
@@ -58,6 +58,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 2021-04-27 10:44:11.000000000 +0200
+++ srtcore/srt.h 2021-04-27 23:47:10.900869000 +0200
@@ -767,7 +767,7 @@
typedef struct SRT_SocketGroupData_ SRT_SOCKGROUPDATA;
-#if ENABLE_EXPERIMENTAL_BONDING
+#ifdef ENABLE_EXPERIMENTAL_BONDING
typedef enum SRT_GROUP_TYPE
{