summaryrefslogtreecommitdiff
path: root/mail/thunderbird/files/patch-bug916589
blob: 3c24bf7ef3327a4da8bee84d96ecbdf8bda7a683 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
index 5b50785..7cf47d5 100644
--- mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
+++ mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
@@ -33,9 +33,10 @@
 #ifndef _SYS_QUEUE_H_
 #define	_SYS_QUEUE_H_
 
-#if !defined(__FreeBSD__) && !defined(DARWIN)
 #include <stddef.h>
-#define __offsetof offsetof
+
+#ifndef offsetof
+#define offsetof(type, field) ((size_t)(&((type *)0)->field))
 #endif
 
 #define STAILQ_FOREACH_SAFE(var, head, field, tvar)                     \
@@ -43,8 +44,6 @@
              (var) && ((tvar) = STAILQ_NEXT((var), field), 1);           \
              (var) = (tvar))
 
-// #define __offsetof(type, field) ((size_t)(&((type *)0)->field))
-
 /*
  * This file defines four types of data structures: singly-linked lists,
  * singly-linked tail queues, lists and tail queues.
@@ -285,7 +284,7 @@ struct {								\
 	(STAILQ_EMPTY((head)) ?						\
 		NULL :							\
 	        ((struct type *)					\
-		((char *)((head)->stqh_last) - __offsetof(struct type, field))))
+		((char *)((head)->stqh_last) - offsetof(struct type, field))))
 
 #define	STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)