summaryrefslogtreecommitdiffstats
path: root/src/socket_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket_wrapper.c')
-rw-r--r--src/socket_wrapper.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 5cb494c..2a88dff 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -184,6 +184,20 @@ enum swrap_dbglvl_e {
(item)->next = NULL; \
} while (0)
+#define SWRAP_DLIST_ADD_AFTER(list, item, el) \
+do { \
+ if ((list) != NULL || (el) != NULL) { \
+ SWRAP_DLIST_ADD(list, item); \
+ } else { \
+ (item)->prev = (el); \
+ (item)->next = (el)->next; \
+ (el)->next = (item); \
+ if ((item)->next != NULL) { \
+ (item)->next->prev = (item); \
+ } \
+ } \
+} while (0)
+
#if defined(HAVE_GETTIMEOFDAY_TZ) || defined(HAVE_GETTIMEOFDAY_TZ_VOID)
#define swrapGetTimeOfDay(tval) gettimeofday(tval,NULL)
#else