소스 검색

HPCC-25881 Fix win. build error relating to config updater

Also fix OSX issue that config updater was invoked, but
filewatcher is unavailable in OSX.

Introduced by HPCC-25754

Signed-off-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Jake Smith 4 년 전
부모
커밋
70f5195392
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      system/jlib/jptree.cpp

+ 4 - 4
system/jlib/jptree.cpp

@@ -8555,7 +8555,7 @@ static void holdLoop()
 }
 #endif
 
-#ifndef _WIN32
+#if defined(__linux__)
 static std::tuple<std::string, IPropertyTree *, IPropertyTree *> doLoadConfiguration(IPropertyTree *componentDefault, const char * * argv, const char * componentTag, const char * envPrefix, const char * legacyFilename, IPropertyTree * (mapper)(IPropertyTree *), const char *altNameAttribute);
 
 class CConfigUpdater : public CInterface
@@ -8661,7 +8661,7 @@ void removeConfigUpdateHook(unsigned notifyFuncId)
 #endif
 }
 #else
-unsigned installConfigUpdateHook(std::function<void ()> notifyFunc)
+unsigned installConfigUpdateHook(ConfigUpdateFunc notifyFunc)
 {
     return 0;
 }
@@ -8669,7 +8669,7 @@ unsigned installConfigUpdateHook(std::function<void ()> notifyFunc)
 void removeConfigUpdateHook(unsigned notifyFuncId)
 {
 }
-#endif
+#endif // __linux__
 
 
 static std::tuple<std::string, IPropertyTree *, IPropertyTree *> doLoadConfiguration(IPropertyTree *componentDefault, const char * * argv, const char * componentTag, const char * envPrefix, const char * legacyFilename, IPropertyTree * (mapper)(IPropertyTree *), const char *altNameAttribute)
@@ -8820,7 +8820,7 @@ jlib_decl IPropertyTree * loadConfiguration(IPropertyTree *componentDefault, con
      * on-demand, which means this mechanism is sufficient to cover most cases.
      */
 
-#ifdef _CONTAINERIZED // NB: not defined in WIN32
+#if defined(__linux__) && defined(_CONTAINERIZED)
     /* In bare-metal - there is no auto process/component restart mechanism, so everything would need to be
      * hooked to ensure state is reflected correctly. Therefore this mechanism is disabled in bare-metal for now.
      */