Переглянути джерело

HPCC-22561 Windows build fails from pid_t type

Signed-off-by: Mark Kelly <mark.kelly@lexisnexisrisk.com>
Mark Kelly 6 роки тому
батько
коміт
5a030e972e
2 змінених файлів з 4 додано та 4 видалено
  1. 2 2
      system/jlib/jdebug.cpp
  2. 2 2
      system/jlib/jdebug.hpp

+ 2 - 2
system/jlib/jdebug.cpp

@@ -4025,7 +4025,7 @@ jlib_decl IUserMetric *createUserMetric(const char *name, const char *matchStrin
     return new UserMetricMsgHandler(name, matchString);
     return new UserMetricMsgHandler(name, matchString);
 }
 }
 
 
-jlib_decl bool printProcessHandles(pid_t pid)
+jlib_decl bool printProcessHandles(unsigned pid)
 {
 {
 #if defined(__linux__)
 #if defined(__linux__)
     StringBuffer curFilePathSB("/proc/");
     StringBuffer curFilePathSB("/proc/");
@@ -4073,7 +4073,7 @@ jlib_decl bool printProcessHandles(pid_t pid)
     return true;
     return true;
 }
 }
 
 
-jlib_decl bool printLsOf(pid_t pid)
+jlib_decl bool printLsOf(unsigned pid)
 {
 {
 #if defined(__linux__)
 #if defined(__linux__)
     if (!pid)
     if (!pid)

+ 2 - 2
system/jlib/jdebug.hpp

@@ -440,8 +440,8 @@ extern jlib_decl void clearAffinityCache(); // should be called whenever the pro
 extern jlib_decl void printProcMap(const char *fn, bool printbody, bool printsummary, StringBuffer *lnout, MemoryBuffer *mb, bool useprintf);
 extern jlib_decl void printProcMap(const char *fn, bool printbody, bool printsummary, StringBuffer *lnout, MemoryBuffer *mb, bool useprintf);
 extern jlib_decl void PrintMemoryReport(bool full=true);
 extern jlib_decl void PrintMemoryReport(bool full=true);
 extern jlib_decl void printAllocationSummary();
 extern jlib_decl void printAllocationSummary();
-extern jlib_decl bool printProcessHandles(pid_t pid=0); // returns false if fails
-extern jlib_decl bool printLsOf(pid_t pid=0); // returns false if fails
+extern jlib_decl bool printProcessHandles(unsigned pid=0); // returns false if fails
+extern jlib_decl bool printLsOf(unsigned pid=0); // returns false if fails
 extern jlib_decl bool areTransparentHugePagesEnabled(HugePageMode mode);
 extern jlib_decl bool areTransparentHugePagesEnabled(HugePageMode mode);
 extern jlib_decl HugePageMode queryTransparentHugePagesMode();
 extern jlib_decl HugePageMode queryTransparentHugePagesMode();
 extern jlib_decl memsize_t getHugePageSize();
 extern jlib_decl memsize_t getHugePageSize();