Support building on OpenBSD (#4912)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58694c3..1b8fe92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,6 +56,8 @@
   set(SPIRV_TIMER_ENABLED ${SPIRV_ALLOW_TIMERS})
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
   add_definitions(-DSPIRV_FREEBSD)
+elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
+  add_definitions(-DSPIRV_OPENBSD)
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
   add_definitions(-DSPIRV_FUCHSIA)
 elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
diff --git a/source/print.cpp b/source/print.cpp
index 90dd5c1..6c94e2b 100644
--- a/source/print.cpp
+++ b/source/print.cpp
@@ -16,7 +16,8 @@
 
 #if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \
     defined(SPIRV_IOS) || defined(SPIRV_TVOS) || defined(SPIRV_FREEBSD) ||  \
-    defined(SPIRV_EMSCRIPTEN) || defined(SPIRV_FUCHSIA) || defined(SPIRV_GNU)
+    defined(SPIRV_OPENBSD) || defined(SPIRV_EMSCRIPTEN) ||                  \
+    defined(SPIRV_FUCHSIA) || defined(SPIRV_GNU)
 namespace spvtools {
 
 clr::reset::operator const char*() { return "\x1b[0m"; }