From 803d5c7f45060bd2459328903b56e74a8c434c45 Mon Sep 17 00:00:00 2001 From: Richard Cartwright Date: Fri, 28 Jun 2019 12:58:37 +0100 Subject: [PATCH] chore: add version switch based on Linux kernel version --- include/omniORB/omniORB4/omniInternal.h | 2 +- src/cxx/quentin.cc | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/include/omniORB/omniORB4/omniInternal.h b/include/omniORB/omniORB4/omniInternal.h index cabf821..aa3975c 100644 --- a/include/omniORB/omniORB4/omniInternal.h +++ b/include/omniORB/omniORB4/omniInternal.h @@ -24,7 +24,7 @@ // // Description: // *** PROPRIETARY INTERFACE *** -// +// #ifndef __OMNIINTERNAL_H__ #define __OMNIINTERNAL_H__ diff --git a/src/cxx/quentin.cc b/src/cxx/quentin.cc index ac228fb..4cf097d 100644 --- a/src/cxx/quentin.cc +++ b/src/cxx/quentin.cc @@ -27,11 +27,21 @@ #include #include #include - +#ifdef __linux__ +#include +#endif OMNI_USING_NAMESPACE(omni) -static const char* _0RL_library_version = omniORB_4_1; +#ifdef __linux__ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(4,15,0) +static const char* _0RL_library_version = omniORB_4_1; // earler than buster, e.g. stretch +#else +static const char* _0RL_library_version = omniORB_4_2; +#endif +#else +static const char* _0RL_library_version = omniORB_4_2; +#endif _init_in_def_( const ::CORBA::Long Quentin::maxNumber = 9999; )