0023250: Missing include in OSD_MemInfo.cxx
authorkgv <kgv@opencascade.com>
Wed, 11 Jul 2012 06:35:19 +0000 (10:35 +0400)
committerkgv <kgv@opencascade.com>
Fri, 13 Jul 2012 13:23:31 +0000 (17:23 +0400)
Function getpid() declared in "unistd.h" header on POSIX-compliant systems.
Fix compilation error with gcc 4.7 on Linux.

src/OSD/OSD_MemInfo.cxx

index 83cef53..f03a037 100644 (file)
@@ -28,6 +28,8 @@
 #elif (defined(__APPLE__))
   #include <mach/task.h>
   #include <mach/mach.h>
+#else
+  #include <unistd.h>
 #endif
 
 #include <string>
@@ -80,7 +82,7 @@ void OSD_MemInfo::Update()
     myCounters[MemSwapUsage]      = aProcMemCnts.PagefileUsage;
     myCounters[MemSwapUsagePeak]  = aProcMemCnts.PeakPagefileUsage;
   }
+
 #elif (defined(__linux__) || defined(__linux))
   // use procfs on Linux
   char aBuff[4096];