slist.h: Change SLIST_* to LIBNFS_LIST_* to avoid name clash on *BSD
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>libnfs-4.0.0-vitalif
parent
8e003243fb
commit
8a52596b74
|
@ -18,15 +18,15 @@
|
|||
#ifndef _LIBNFS_SLIST_H_
|
||||
#define _LIBNFS_SLIST_H_
|
||||
|
||||
#define SLIST_ADD(list, item) \
|
||||
#define LIBNFS_LIST_ADD(list, item) \
|
||||
do { \
|
||||
(item)->next = (*list); \
|
||||
(*list) = (item); \
|
||||
} while (0);
|
||||
|
||||
#define SLIST_ADD_END(list, item) \
|
||||
#define LIBNFS_LIST_ADD_END(list, item) \
|
||||
if ((*list) == NULL) { \
|
||||
SLIST_ADD((list), (item)); \
|
||||
LIBNFS_LIST_ADD((list), (item)); \
|
||||
} else { \
|
||||
void *head = (*list); \
|
||||
while ((*list)->next) \
|
||||
|
@ -36,7 +36,7 @@
|
|||
(*list) = head; \
|
||||
}
|
||||
|
||||
#define SLIST_REMOVE(list, item) \
|
||||
#define LIBNFS_LIST_REMOVE(list, item) \
|
||||
if ((*list) == (item)) { \
|
||||
(*list) = (item)->next; \
|
||||
} else { \
|
||||
|
|
|
@ -222,7 +222,7 @@ int rpc_add_fragment(struct rpc_context *rpc, char *data, uint64_t size)
|
|||
}
|
||||
|
||||
memcpy(fragment->data, data, fragment->size);
|
||||
SLIST_ADD_END(&rpc->fragments, fragment);
|
||||
LIBNFS_LIST_ADD_END(&rpc->fragments, fragment);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue