From 3bfdeab4828b49b1abb9cce0cdcdade4aa26a4cf Mon Sep 17 00:00:00 2001 From: obache Date: Sat, 7 Jun 2014 08:17:52 +0000 Subject: Rename "iovec" to "iovec_p", avoid to conflict with "struct iovec" defined in sys/uio.h. Fixes build on Haiku with gcc2. --- databases/db4/patches/patch-repmgr_repmgr__posix.c | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 databases/db4/patches/patch-repmgr_repmgr__posix.c (limited to 'databases/db4') diff --git a/databases/db4/patches/patch-repmgr_repmgr__posix.c b/databases/db4/patches/patch-repmgr_repmgr__posix.c new file mode 100644 index 00000000000..d9569deafa6 --- /dev/null +++ b/databases/db4/patches/patch-repmgr_repmgr__posix.c @@ -0,0 +1,44 @@ +$NetBSD: patch-repmgr_repmgr__posix.c,v 1.1 2014/06/07 08:17:52 obache Exp $ + +* avoid to conflict with "struct iovec" defined in sys/uio.h. + +--- repmgr/repmgr_posix.c.orig 2010-04-12 20:25:35.000000000 +0000 ++++ repmgr/repmgr_posix.c +@@ -488,15 +488,15 @@ __repmgr_wake_main_thread(env) + * PUBLIC: int __repmgr_writev __P((socket_t, db_iovec_t *, int, size_t *)); + */ + int +-__repmgr_writev(fd, iovec, buf_count, byte_count_p) ++__repmgr_writev(fd, iovec_p, buf_count, byte_count_p) + socket_t fd; +- db_iovec_t *iovec; ++ db_iovec_t *iovec_p; + int buf_count; + size_t *byte_count_p; + { + int nw; + +- if ((nw = writev(fd, iovec, buf_count)) == -1) ++ if ((nw = writev(fd, iovec_p, buf_count)) == -1) + return (errno); + *byte_count_p = (size_t)nw; + return (0); +@@ -506,15 +506,15 @@ __repmgr_writev(fd, iovec, buf_count, by + * PUBLIC: int __repmgr_readv __P((socket_t, db_iovec_t *, int, size_t *)); + */ + int +-__repmgr_readv(fd, iovec, buf_count, byte_count_p) ++__repmgr_readv(fd, iovec_p, buf_count, byte_count_p) + socket_t fd; +- db_iovec_t *iovec; ++ db_iovec_t *iovec_p; + int buf_count; + size_t *byte_count_p; + { + ssize_t nw; + +- if ((nw = readv(fd, iovec, buf_count)) == -1) ++ if ((nw = readv(fd, iovec_p, buf_count)) == -1) + return (errno); + *byte_count_p = (size_t)nw; + return (0); -- cgit v1.2.3