diff --git a/src/queue.h b/src/queue.h index 2f5ab610..aa15837d 100644 --- a/src/queue.h +++ b/src/queue.h @@ -16,8 +16,6 @@ #ifndef QUEUE_H_ #define QUEUE_H_ -#include - typedef void *QUEUE[2]; /* Private macros. */ @@ -28,7 +26,7 @@ typedef void *QUEUE[2]; /* Public macros. */ #define QUEUE_DATA(ptr, type, field) \ - ((type *) ((char *) (ptr) - ((uintptr_t) &((type *) 0)->field))) + ((type *) ((char *) (ptr) - ((char *) &((type *) 0)->field))) #define QUEUE_FOREACH(q, h) \ for ((q) = (QUEUE *) (*(h))[0]; (q) != (h); (q) = (QUEUE *) (*(q))[0])