[rtems-libbsd commit] _iovec.h: Ensure only one definition of struct iovec

Joel Sherrill joel at rtems.org
Sat Sep 1 14:42:56 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    b4cf93e3ad705e8cf5b121652844a9de6d1c056b
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=b4cf93e3ad705e8cf5b121652844a9de6d1c056b

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Fri Aug 31 19:21:34 2012 -0500

_iovec.h: Ensure only one definition of struct iovec

---

 freebsd/sys/_iovec.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/freebsd/sys/_iovec.h b/freebsd/sys/_iovec.h
index aef21a5..b259a2e 100644
--- a/freebsd/sys/_iovec.h
+++ b/freebsd/sys/_iovec.h
@@ -40,9 +40,19 @@ typedef	__size_t	size_t;
 #define	_SIZE_T_DECLARED
 #endif
 
+#ifdef __rtems__
+#ifndef __IOVEC_DEFINED
+#define __IOVEC_DEFINED
 struct iovec {
 	void	*iov_base;	/* Base address. */
 	size_t	 iov_len;	/* Length. */
 };
+#endif
+#else
+struct iovec {
+	void	*iov_base;	/* Base address. */
+	size_t	 iov_len;	/* Length. */
+};
+#endif
 
 #endif /* !_SYS__IOVEC_HH_ */




More information about the vc mailing list