From 8e9970fb30fe85521ef57464b77ea0354b42c719 Mon Sep 17 00:00:00 2001
From: Wouter Klouwen <wouter.klouwen@youview.com>
Date: Fri, 18 Jan 2019 20:28:15 +0000
Subject: [PATCH] SystemInformation: support BSD platforms for GetProcessId

GetProcessId() is currently only implemented for Win32, Linux and OS X.

This commit adds wider support for it by extending the definitions in
the function to also cover BSD platforms, which implement this function.
---
 SystemInformation.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index d368fa29..6c12355d 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -3871,7 +3871,8 @@ SystemInformation::LongLong SystemInformationImplementation::GetProcessId()
 {
 #if defined(_WIN32)
   return GetCurrentProcessId();
-#elif defined(__linux) || defined(__APPLE__)
+#elif defined(__linux) || defined(__APPLE__) || defined(__OpenBSD__) ||       \
+  defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
   return getpid();
 #else
   return -1;
-- 
GitLab