]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/freebsd-queue.h
Merge pull request #5628 from donaldsharp/rtm_getneigh
[mirror_frr.git] / lib / freebsd-queue.h
index 658b602ba3f740d4a2672f6c633dc0e36ac9e746..793cfff8d3d1b7b9121ede47708a88e10f35f1a2 100644 (file)
 #ifndef _SYS_QUEUE_H_
 #define        _SYS_QUEUE_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * This file defines four types of data structures: singly-linked lists,
  * singly-linked tail queues, lists and tail queues.
@@ -302,8 +306,7 @@ struct qm_trace {
        (STAILQ_EMPTY((head))                                                  \
                 ? NULL                                                        \
                 : ((struct type *)(void *)((char *)((head)->stqh_last)        \
-                                           - __offsetof(struct type,          \
-                                                        field))))
+                                           - offsetof(struct type, field))))
 
 #define        STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
 
@@ -676,4 +679,8 @@ struct qm_trace {
                        (head2)->tqh_last = &(head2)->tqh_first;               \
        } while (0)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* !_SYS_QUEUE_H_ */