From: Ronnie Sahlberg Date: Thu, 15 May 2014 02:11:03 +0000 (-0700) Subject: slist.h: Change SLIST_* to LIBNFS_LIST_* to avoid name clash on *BSD X-Git-Tag: upstream/1.9.6^2~37 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=8a52596b74e8e5cf371e3f6cbeae0ae87d2d558e;p=deb_libnfs.git slist.h: Change SLIST_* to LIBNFS_LIST_* to avoid name clash on *BSD Signed-off-by: Ronnie Sahlberg --- 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; }