From 71cbecbd485e41df9e471e983cb8e1628d1bd58e Mon Sep 17 00:00:00 2001 From: huangji Date: Wed, 9 Apr 2025 18:02:55 +0800 Subject: [PATCH] fix gcc build error Signed-off-by: huangji --- contrib/gms_tcp/gms_tcp.cpp | 2 +- src/gausskernel/optimizer/commands/sequence/sequence.cpp | 2 +- src/include/client_logic/cstrings_map.h | 1 + src/include/knl/knl_instance.h | 8 ++++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/contrib/gms_tcp/gms_tcp.cpp b/contrib/gms_tcp/gms_tcp.cpp index 93093b0875..d61b892b65 100644 --- a/contrib/gms_tcp/gms_tcp.cpp +++ b/contrib/gms_tcp/gms_tcp.cpp @@ -712,7 +712,7 @@ gms_tcp_encode_data_by_charset(GMS_TCP_CONNECTION_STATE *c_state, GMS_TCP_CONNEC cd = iconv_open(client_encoding_name, c_state->c_info.charset); } - if (cd < 0) { + if (cd < (iconv_t)0) { return NULL; } diff --git a/src/gausskernel/optimizer/commands/sequence/sequence.cpp b/src/gausskernel/optimizer/commands/sequence/sequence.cpp index edb1a5f49b..434d81128d 100644 --- a/src/gausskernel/optimizer/commands/sequence/sequence.cpp +++ b/src/gausskernel/optimizer/commands/sequence/sequence.cpp @@ -781,7 +781,7 @@ static T_Int FetchLogLocal(T_Int* next, T_Int* result, T_Int* last, T_Int maxv, } template -static Datum GetIntDefVal(TypeName* name, T value) +static Datum GetIntDefVal(TypeName** name, T value) { if (large) { *name = makeTypeNameFromOid(INT16OID, -1); diff --git a/src/include/client_logic/cstrings_map.h b/src/include/client_logic/cstrings_map.h index b5f4875799..f2a3381116 100644 --- a/src/include/client_logic/cstrings_map.h +++ b/src/include/client_logic/cstrings_map.h @@ -25,6 +25,7 @@ #define C_STRINGS_MAP_H #include #include +#include #define MAX_VAL_LEN 1024 #define NAMEDATALEN 64 diff --git a/src/include/knl/knl_instance.h b/src/include/knl/knl_instance.h index 8a8538370a..ab69fe563d 100755 --- a/src/include/knl/knl_instance.h +++ b/src/include/knl/knl_instance.h @@ -81,6 +81,14 @@ #include "access/htap/imcstore_delta.h" #endif +#ifdef KRB5 +#include +/* Some old versions of Kerberos do not include in */ +#if !defined(__COM_ERR_H) && !defined(__COM_ERR_H__) +#include +#endif +#endif /* KRB5 */ + const int NUM_PERCENTILE_COUNT = 2; const int INIT_NUMA_ALLOC_COUNT = 32; const int HOTKEY_ABANDON_LENGTH = 100; -- Gitee