代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/mysql5 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
diff --git a/rapid/plugin/group_replication/rpcgen.cmake b/rapid/plugin/group_replication/rpcgen.cmake
index b9c5895..f4569cd 100644
--- a/rapid/plugin/group_replication/rpcgen.cmake
+++ b/rapid/plugin/group_replication/rpcgen.cmake
@@ -87,6 +87,12 @@ FOREACH(X xcom_vp)
${XCOM_BASEDIR}/xcom_proto_enum.h
${XCOM_BASEDIR}/xcom_limits.h)
ELSE()
+ FIND_PROGRAM(RPCGEN_EXECUTABLE rpcgen DOC "path to the rpcgen executable")
+ MARK_AS_ADVANCED(RPCGEN_EXECUTABLE)
+ IF(NOT RPCGEN_EXECUTABLE)
+ MESSAGE(FATAL_ERROR "Could not find rpcgen")
+ ENDIF()
+
# on unix systems try to generate them if needed
ADD_CUSTOM_COMMAND(OUTPUT ${x_gen_h} ${x_gen_c} ${x_tmp_plat_h}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
@@ -103,10 +109,10 @@ FOREACH(X xcom_vp)
# generate the sources
COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_h}
- COMMAND rpcgen -C -h -o
+ COMMAND ${RPCGEN_EXECUTABLE} -C -h -o
${x_gen_h} ${x_tmp_x_canonical_name}
COMMAND ${CMAKE_COMMAND} -E remove -f ${x_gen_c}
- COMMAND rpcgen -C -c -o
+ COMMAND ${RPCGEN_EXECUTABLE} -C -c -o
${x_gen_c} ${x_tmp_x_canonical_name}
WORKING_DIRECTORY ${gen_xdr_dir}
DEPENDS
diff --git a/rapid/plugin/group_replication/CMakeLists.txt b/rapid/plugin/group_replication/CMakeLists.txt
index 5bcaa8b..bce9de4 100644
--- a/rapid/plugin/group_replication/CMakeLists.txt
+++ b/rapid/plugin/group_replication/CMakeLists.txt
@@ -218,6 +218,7 @@ MYSQL_ADD_PLUGIN(group_replication
LINK_LIBRARIES
${LZ4_LIBRARY}
${SSL_LIBRARIES}
+ ${TIRPC_LIBRARY}
MODULE_ONLY MODULE_OUTPUT_NAME "group_replication")
### INSTALLATION ###
diff --git a/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c b/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
index 245dda0..210e124 100644
--- a/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
+++ b/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c
@@ -417,7 +417,11 @@ x_putbytes (XDR *xdrs, const char *bp MY_ATTRIBUTE((unused)), u_int len)
static u_int
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(HAVE_TIRPC)
+x_getpostn(XDR *xdrs)
+#else
x_getpostn (const XDR *xdrs)
+#endif
{
#ifdef OLD_XDR
return (u_int)(xdrs->x_handy);
diff --git a/rapid/plugin/group_replication/rpcgen.cmake b/rapid/plugin/group_replication/rpcgen.cmake
index f4569cd..cccb1c3 100644
--- a/rapid/plugin/group_replication/rpcgen.cmake
+++ b/rapid/plugin/group_replication/rpcgen.cmake
@@ -93,6 +93,24 @@ FOREACH(X xcom_vp)
MESSAGE(FATAL_ERROR "Could not find rpcgen")
ENDIF()
+ # First look for tirpc, then the old Sun RPC
+ FIND_PATH(RPC_INCLUDE_DIR
+ NAMES rpc/rpc.h
+ HINTS /usr/include/tirpc
+ NO_DEFAULT_PATH
+ )
+ FIND_PATH(RPC_INCLUDE_DIR NAMES rpc/rpc.h)
+ IF(NOT RPC_INCLUDE_DIR)
+ MESSAGE(FATAL_ERROR
+ "Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc")
+ ENDIF()
+ MESSAGE(STATUS "RPC_INCLUDE_DIR ${RPC_INCLUDE_DIR}")
+ IF(RPC_INCLUDE_DIR STREQUAL "/usr/include/tirpc")
+ INCLUDE_DIRECTORIES(SYSTEM /usr/include/tirpc)
+ ADD_DEFINITIONS(-DHAVE_TIRPC)
+ SET(TIRPC_LIBRARY tirpc)
+ ENDIF()
+
# on unix systems try to generate them if needed
ADD_CUSTOM_COMMAND(OUTPUT ${x_gen_h} ${x_gen_c} ${x_tmp_plat_h}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。