From d4b29b4d6cf9b3a4b72f3d29dd2dac1679f78efc Mon Sep 17 00:00:00 2001 From: Begasus Date: Wed, 27 Sep 2023 15:59:34 +0200 Subject: Import patch from previous version diff --git a/dist/Makefile.in b/dist/Makefile.in index c9f4c32..2ce53a7 100644 --- a/dist/Makefile.in +++ b/dist/Makefile.in @@ -17,7 +17,7 @@ exec_prefix=@exec_prefix@ bindir= @bindir@ includedir=@includedir@ libdir= @libdir@ -docdir= $(prefix)/docs +docdir= @docdir@ dmode= 755 emode= 555 @@ -1299,8 +1299,8 @@ uninstall_utilities: # We install csharp docs even on UNIX so we don't have a # broken link on the landing page. -DOCLIST=api_reference articles bdb-sql collections csharp gsg \ - gsg_db_rep gsg_db_server gsg_txn index.html installation \ +DOCLIST=api_reference articles collections csharp gsg \ + gsg_db_rep gsg_txn index.html installation \ java license porting programmer_reference upgrading install_docs: diff --git a/dist/configure b/dist/configure index 2cb5d60..bb50e5e 100755 --- a/dist/configure +++ b/dist/configure @@ -5213,6 +5213,8 @@ irix*) optimize_flag="-O2" CPPFLAGS="$CPPFLAGS -D_SGI_MP_SOURCE";; mpeix*) CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_SOCKET_SOURCE" LIBSO_LIBS="$LIBSO_LIBS -lsocket -lsvipc";; +haiku*) + LIBSO_LIBS="$LIBSO_LIBS -lnetwork";; osf*) CPPFLAGS="$CPPFLAGS -pthread";; *qnx*) qnx_build="yes" $as_echo "#define HAVE_QNX 1" >>confdefs.h diff --git a/dist/configure.ac b/dist/configure.ac index 9747ab8..026abc5 100644 --- a/dist/configure.ac +++ b/dist/configure.ac @@ -203,6 +203,8 @@ irix*) optimize_flag="-O2" CPPFLAGS="$CPPFLAGS -D_SGI_MP_SOURCE";; mpeix*) CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_SOCKET_SOURCE" LIBSO_LIBS="$LIBSO_LIBS -lsocket -lsvipc";; +haiku*) + LIBSO_LIBS="$LIBSO_LIBS -lnetwork";; osf*) CPPFLAGS="$CPPFLAGS -pthread";; *qnx*) qnx_build="yes" AC_DEFINE(HAVE_QNX) @@ -587,6 +589,9 @@ AC_SEARCH_LIBS(sched_yield, rt) # The Berkeley DB library calls fdatasync, only available in -lrt on Solaris. AC_SEARCH_LIBS(fdatasync, rt) +# Socket only available in -lnetwork on Haiku +AC_SEARCH_LIBS(socket, network) + AC_SEARCH_LIBS(getaddrinfo, nsl socket) AC_SEARCH_LIBS(hstrerror, resolv) diff --git a/src/repmgr/repmgr_posix.c b/src/repmgr/repmgr_posix.c index 87d2cd0..c13b902 100644 --- a/src/repmgr/repmgr_posix.c +++ b/src/repmgr/repmgr_posix.c @@ -645,11 +645,7 @@ __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) - socket_t fd; - db_iovec_t *iovec; - int buf_count; - size_t *byte_count_p; +__repmgr_writev(socket_t fd, db_iovec_t *iovec, int buf_count, size_t *byte_count_p) { int nw, result; @@ -667,11 +663,7 @@ __repmgr_writev(fd, iovec, buf_count, byte_count_p) * PUBLIC: int __repmgr_readv __P((socket_t, db_iovec_t *, int, size_t *)); */ int -__repmgr_readv(fd, iovec, buf_count, byte_count_p) - socket_t fd; - db_iovec_t *iovec; - int buf_count; - size_t *byte_count_p; +__repmgr_readv(socket_t fd, db_iovec_t *iovec, int buf_count, size_t *byte_count_p) { int result; ssize_t nw; -- 2.37.3