浏览代码

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.
      */