From 8a52596b74e8e5cf371e3f6cbeae0ae87d2d558e Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 14 May 2014 19:11:03 -0700 Subject: [PATCH] slist.h: Change SLIST_* to LIBNFS_LIST_* to avoid name clash on *BSD Signed-off-by: Ronnie Sahlberg --- include/slist.h | 8 ++++---- lib/init.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/slist.h b/include/slist.h index 8bb6ca4..5755ca1 100644 --- a/include/slist.h +++ b/include/slist.h @@ -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 { \ diff --git a/lib/init.c b/lib/init.c index d655203..782a7ea 100644 --- a/lib/init.c +++ b/lib/init.c @@ -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; } -- 2.34.1