From ecba19531ac68586b4e06f6cc40e92447091bc28 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 17 Jul 2016 00:25:34 +0000 Subject: list: avoid incompatibility with *BSD sys/queue.h The OS X build pulls in sys/queue.h, which pollutes the preprocessor namespace with a macro generically named LIST_HEAD, and clashes with the name we use here. ref: http://mid.gmane.org/FB76544F-16F7-45CA-9649-FD62EE44B0DE@gmail.com Reported-by: Lars Schneider Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- list.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'list.h') diff --git a/list.h b/list.h index f65edce148..a226a870dc 100644 --- a/list.h +++ b/list.h @@ -36,6 +36,8 @@ struct list_head { struct list_head *next, *prev; }; +/* avoid conflicts with BSD-only sys/queue.h */ +#undef LIST_HEAD /* Define a variable with the head and tail of the list. */ #define LIST_HEAD(name) \ struct list_head name = { &(name), &(name) } -- cgit v1.2.3