with pqueue moving to a private interface, the typedef can occur twice

../include/openssl/dtls1.h:147:25: error: redefinition of typedef 'pqueue' is a 
C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct _pqueue *pqueue;
                        ^
../include/pqueue.h:63:25: note: previous definition is here
typedef struct _pqueue *pqueue;
---
 src/ssl/dtls1.h  | 3 +++
 src/ssl/pqueue.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/ssl/dtls1.h b/src/ssl/dtls1.h
index b0cf839..3dc2234 100644
--- a/src/ssl/dtls1.h
+++ b/src/ssl/dtls1.h
@@ -143,8 +143,11 @@ struct dtls1_timeout_st {
        unsigned int num_alerts;
 };
 
+#ifndef HAVE_STRUCT_PQUEUE
+#define HAVE_STRUCT_PQUEUE
 struct _pqueue;
 typedef struct _pqueue *pqueue;
+#endif
 
 typedef struct record_pqueue_st {
        unsigned short epoch;
diff --git a/src/ssl/pqueue.h b/src/ssl/pqueue.h
index 4b16787..78ce08f 100644
--- a/src/ssl/pqueue.h
+++ b/src/ssl/pqueue.h
@@ -60,7 +60,10 @@
 #ifndef HEADER_PQUEUE_H
 #define HEADER_PQUEUE_H
 
+#ifndef HAVE_STRUCT_PQUEUE
+#define HAVE_STRUCT_PQUEUE
 typedef struct _pqueue *pqueue;
+#endif
 
 typedef struct _pitem {
        unsigned char priority[8]; /* 64-bit value in big-endian encoding */
-- 
1.9.3

Reply via email to