From ff351e2c21cd45401f8b18a89ef13ab2938f19cf Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 24 May 2021 17:46:53 +0000
Subject: Haiku doesn't define __STDC_NO_THREADS__ nor __GLIBC__


diff --git a/numpy/f2py/cfuncs.py b/numpy/f2py/cfuncs.py
index f403a66..e916c1d 100644
--- a/numpy/f2py/cfuncs.py
+++ b/numpy/f2py/cfuncs.py
@@ -552,7 +552,8 @@ cppmacros["F2PY_THREAD_LOCAL_DECL"] = """\
 #elif defined(__STDC_VERSION__) \\
       && (__STDC_VERSION__ >= 201112L) \\
       && !defined(__STDC_NO_THREADS__) \\
-      && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12))
+      && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12)) \\
+      && !defined(__HAIKU__)
 /* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12,
    see https://lists.gnu.org/archive/html/commit-hurd/2012-07/msg00180.html,
    so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence
-- 
2.30.2

