slist.h: Change SLIST_* to LIBNFS_LIST_* to avoid name clash on *BSD
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 15 May 2014 02:11:03 +0000 (19:11 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 15 May 2014 02:11:03 +0000 (19:11 -0700)
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
include/slist.h
lib/init.c

index 8bb6ca480cdf2740115510fd8e0e100604714b80..5755ca14e3b6edef9b4488329a417c6bfa3a03a8 100644 (file)
 #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 {                                                \
index d65520354f80ea2457c6bf633a85b4bfe9ee18db..782a7ea3edbac2da46c4c557d2de37a945ca24cb 100644 (file)
@@ -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;
 }