Fix compile errors created by bundling queue.h
This commit is contained in:
parent
6ca79042b9
commit
7700e6fe79
@ -77,6 +77,51 @@ extern "C" {
|
|||||||
# define RC_LOCAL_CONFDIR RC_LOCAL_PREFIX "/etc/conf.d"
|
# define RC_LOCAL_CONFDIR RC_LOCAL_PREFIX "/etc/conf.d"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SYS_QUEUE_H_
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following are copied directly from our imported queue.h.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List definitions.
|
||||||
|
*/
|
||||||
|
#define LIST_HEAD(name, type) \
|
||||||
|
struct name { \
|
||||||
|
struct type *lh_first; /* first element */ \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LIST_HEAD_INITIALIZER(head) \
|
||||||
|
{ NULL }
|
||||||
|
|
||||||
|
#define LIST_ENTRY(type) \
|
||||||
|
struct { \
|
||||||
|
struct type *le_next; /* next element */ \
|
||||||
|
struct type **le_prev; /* address of previous next element */ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Tail queue definitions.
|
||||||
|
*/
|
||||||
|
#define _TAILQ_HEAD(name, type, qual) \
|
||||||
|
struct name { \
|
||||||
|
qual type *tqh_first; /* first element */ \
|
||||||
|
qual type *qual *tqh_last; /* addr of last next element */ \
|
||||||
|
}
|
||||||
|
#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
|
||||||
|
|
||||||
|
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||||
|
{ TAILQ_END(head), &(head).tqh_first }
|
||||||
|
|
||||||
|
#define _TAILQ_ENTRY(type, qual) \
|
||||||
|
struct { \
|
||||||
|
qual type *tqe_next; /* next element */ \
|
||||||
|
qual type *qual *tqe_prev; /* address of previous next element */\
|
||||||
|
}
|
||||||
|
#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
|
||||||
|
|
||||||
|
#endif /* _SYS_QUEUE_H_ */
|
||||||
|
|
||||||
/* A doubly linked list using queue(3) for ease of use */
|
/* A doubly linked list using queue(3) for ease of use */
|
||||||
typedef struct rc_string {
|
typedef struct rc_string {
|
||||||
char *value;
|
char *value;
|
||||||
|
Loading…
Reference in New Issue
Block a user