$OpenBSD: patch-lib_x86_64_libm_amd_h,v 1.5 2019/08/12 15:41:55 bcallah Exp $

We need the compat.

Index: lib/x86_64/libm_amd.h
--- lib/x86_64/libm_amd.h.orig
+++ lib/x86_64/libm_amd.h
@@ -68,7 +68,7 @@ regulations applicable in licensee's jurisdiction.
 
 #include <math.h>
 
-#if !defined(TARGET_WIN)
+#if !defined(TARGET_LINUX)
 typedef long __INT8_T;
 typedef unsigned long __UINT8_T;
 
@@ -80,7 +80,13 @@ typedef unsigned long long __UINT8_T;
 /* Open Tools #defines ldexpf */
 #undef ldexpf
 
+/* We're missing these on OpenBSD, found in NetBSD math.h */
+#define DOMAIN         1
+#define SING           2
+#define OVERFLOW       3
+#define UNDERFLOW      4
 
+
 /* Types of exceptions in the `type' field.  */
 #if	! defined(TARGET_WIN)
 # define DOMAIN         1
@@ -91,6 +97,8 @@ typedef unsigned long long __UINT8_T;
 # define PLOSS          6
 #endif
 
+/* The BSDs (and probably macOS too) already define HUGE in math.h */
+# undef HUGE
 # define HUGE           3.40282347e+38F
 
 #endif
