$OpenBSD: patch-src_gmic_cpp,v 1.1.1.1 2021/05/16 09:42:24 espie Exp $

Index: src/gmic.cpp
--- src/gmic.cpp.orig
+++ src/gmic.cpp
@@ -2458,6 +2458,8 @@ CImgList<void*> gmic::list_p_is_abort = CImgList<void*
 bool *gmic::abort_ptr(bool *const p_is_abort) {
 #if defined(__MACOSX__) || defined(__APPLE__)
   void* tid = (void*)(cimg_ulong)getpid();
+#elif defined(__OpenBSD__)
+  void* tid = (void*)pthread_self();
 #elif cimg_OS==1
   void* tid = (void*)(cimg_ulong)syscall(SYS_gettid);
 #elif cimg_OS==2
@@ -2798,6 +2800,8 @@ gmic::~gmic() {
   cimg::mutex(21);
 #if defined(__MACOSX__) || defined(__APPLE__)
   void* tid = (void*)(cimg_ulong)getpid();
+#elif defined(__OpenBSD__)
+  void* tid = (void*)pthread_self();
 #elif cimg_OS==1
   void* tid = (void*)(cimg_ulong)syscall(SYS_gettid);
 #elif cimg_OS==2
