From 8531046a86afcff6c93591fb88e2a22ec2c7e0a0 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 20 Aug 2013 14:05:25 +0200 Subject: [PATCH] windows: omit stdint.h, fix msvc 2008 build error Don't include , it's not available when compiling with MSVC 2008 and we don't need it in the first place - just cast the argument to `char *` rather than `uintptr_t`. Fixes #893. --- src/queue.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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])