diff --git a/configure b/configure index 22009e034232e74d8f429299b4a97b2450db955e..fb65b23cb0372b4c6b2fc0c68376f9dcc1fe490a 100755 --- a/configure +++ b/configure @@ -709,6 +709,7 @@ with_selinux krb_srvtab with_python with_openeuler_os +with_openeuler_major enable_thread_safety INCLUDES TAS @@ -828,6 +829,7 @@ enable_nls with_pgport with_gs_version with_openeuler_os +with_openeuler_major enable_shared enable_rpath enable_jemalloc @@ -3272,6 +3274,9 @@ _ACEOF fi +if [ "$(cat /etc/system-release)" == "openEuler release 22.03 LTS" ]; then + with_openeuler_major=yes +fi # # --enable-coverage enables generation of code coverage metrics with gcov diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 2db3b14b3f0908bc1bd23efda76df39f843bf4e4..3437943d6f3f752443b694a9b97ac389de697a50 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -211,6 +211,7 @@ TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ with_openeuler_os = @with_openeuler_os@ +with_openeuler_major = @with_openeuler_major@ ############################################################################# @@ -728,6 +729,11 @@ endif ifeq ($(with_openeuler_os), yes) override CPPFLAGS := $(CPPFLAGS) -DWITH_OPENEULER_OS endif + +ifeq ($(with_openeuler_major), yes) + override CPPFLAGS := $(CPPFLAGS) -DOPENEULER_MAJOR +endif + CC = @CC@ GCC = @GCC@ C = gcc diff --git a/src/gausskernel/cbb/bbox/bbox_elf_dump.h b/src/gausskernel/cbb/bbox/bbox_elf_dump.h index 21c675e93220a49bdcfc9f86b46bcbbc10aef63b..acdf5ede45b1186cdc2ef67397b7ab651a0d66dd 100644 --- a/src/gausskernel/cbb/bbox/bbox_elf_dump.h +++ b/src/gausskernel/cbb/bbox/bbox_elf_dump.h @@ -31,10 +31,10 @@ #include #include #include -#ifndef WITH_OPENEULER_OS -#include -#else +#if (defined WITH_OPENEULER_OS) || (defined OPENEULER_MAJOR) #include +#else +#include #endif #include #include diff --git a/src/gausskernel/cbb/bbox/bbox_syscall_support.h b/src/gausskernel/cbb/bbox/bbox_syscall_support.h index c131a573df291f02c6e92a8564f26b959947f75a..12adc5728e735cf88d210450299a21ab0faf5c9d 100644 --- a/src/gausskernel/cbb/bbox/bbox_syscall_support.h +++ b/src/gausskernel/cbb/bbox/bbox_syscall_support.h @@ -54,10 +54,10 @@ #include #include #include -#ifndef WITH_OPENEULER_OS -#include -#else +#if (defined WITH_OPENEULER_OS) || (defined OPENEULER_MAJOR) #include +#else +#include #endif #include #include diff --git a/src/gausskernel/cbb/bbox/bbox_threads.h b/src/gausskernel/cbb/bbox/bbox_threads.h index bb890047f0fdbfed6caf8370694d709de318fe81..bf91fd3028c067c84ce267d1e22d57eda607566f 100644 --- a/src/gausskernel/cbb/bbox/bbox_threads.h +++ b/src/gausskernel/cbb/bbox/bbox_threads.h @@ -28,6 +28,10 @@ #define PAGE_SIZE 4096 #define BBOX_PROC_PATH_LEN 128 +#ifdef MINSIGSTKSZ +#undef MINSIGSTKSZ +#endif +#define MINSIGSTKSZ 5120 #define BBOX_ALT_STACKSIZE (MINSIGSTKSZ + 4096 * 32) diff --git a/src/gausskernel/storage/mot/core/system/statistics/process_statistics.h b/src/gausskernel/storage/mot/core/system/statistics/process_statistics.h index 55c9fa9a857889a93e43f47fdd8451fc8af35405..21b34de27fc2e0a655181f4556a3dd27aa1afb11 100644 --- a/src/gausskernel/storage/mot/core/system/statistics/process_statistics.h +++ b/src/gausskernel/storage/mot/core/system/statistics/process_statistics.h @@ -30,7 +30,9 @@ #include "typed_statistics_generator.h" #include "sys/times.h" +#ifndef OPENEULER_MAJOR #include "sys/vtimes.h" +#endif namespace MOT { /** diff --git a/src/include/communication/commproxy_interface.h b/src/include/communication/commproxy_interface.h index 5a3aa0484f1c5eac43da342d6a1ef05ba3ca72aa..67dab2f4a8d5199d016425baca5ce86f43655fd2 100644 --- a/src/include/communication/commproxy_interface.h +++ b/src/include/communication/commproxy_interface.h @@ -164,7 +164,7 @@ extern ErrorLevel min_debug_level; #define MAX_CONTINUOUS_COUNT 10 #define INIT_TX_ALLOC_BUFF_NUM 5 -#ifndef WITH_OPENEULER_OS +#if (!defined WITH_OPENEULER_OS) && (!defined OPENEULER_MAJOR) extern int gettimeofday(struct timeval* tp, struct timezone* tzp); #endif //extern THR_LOCAL knl_thrd_context t_thrd;