From 3be595258bd59bb79913e056b23952c50096375a Mon Sep 17 00:00:00 2001
From: tnn <tnn@pkgsrc.org>
Date: Mon, 25 Apr 2022 13:53:15 +0000
Subject: exchess: avoid ambiguous math functions

---
 games/exchess/patches/patch-src_smp.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 games/exchess/patches/patch-src_smp.cpp

(limited to 'games/exchess/patches')

diff --git a/games/exchess/patches/patch-src_smp.cpp b/games/exchess/patches/patch-src_smp.cpp
new file mode 100644
index 00000000000..528870252ac
--- /dev/null
+++ b/games/exchess/patches/patch-src_smp.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_smp.cpp,v 1.1 2022/04/25 13:53:15 tnn Exp $
+
+Explicitly use std::sqrt, avoids ambiguous reference on SunOS.
+
+--- src/smp.cpp.orig	2017-02-04 14:23:32.000000000 +0000
++++ src/smp.cpp
+@@ -14,6 +14,8 @@
+ #include "chess.h"
+ #include "search.h"
+ 
++using std::sqrt;
++
+ //-----------------------------------------------
+ // Global variables to control SMP search
+ //-----------------------------------------------
-- 
cgit v1.2.3