[vlc-devel] [PATCH] include/vlc_fixups.h: Prevent redefinition of iovec structure.

Biswapriyo Nath nathbappai at gmail.com
Fri Sep 4 07:22:56 CEST 2020


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200903/06fb70a2/attachment.html>
-------------- next part --------------
From 426faffa232fbf0a9b9af8044c715c1d7a473220 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai at gmail.com>
Date: Thu, 3 Sep 2020 22:22:14 -0700
Subject: [PATCH] include/vlc_fixups.h: Prevent redefinition of iovec structure.

iovec structure is defined in sasl.h file in Cyrus SASL project.
And sasl.h is include from rfbclient.h file in libvncserver.
By checking STRUCT_IOVEC_DEFINED, this redefinition can be prevented.

Signed-off-by: Biswapriyo Nath <nathbappai at gmail.com>
---
 include/vlc_fixups.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 51286f5..6f0a01a 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -446,11 +446,14 @@ struct timespec {
 #endif
 
 #ifdef _WIN32
+#ifndef STRUCT_IOVEC_DEFINED
+#define STRUCT_IOVEC_DEFINED 1
 struct iovec
 {
     void  *iov_base;
     size_t iov_len;
 };
+#endif
 #define IOV_MAX 255
 struct msghdr
 {
-- 
2.27.0



More information about the vlc-devel mailing list