From f21c8a7e27842a65f8ed282209a84c628ef839ef Mon Sep 17 00:00:00 2001 From: he Date: Sun, 24 Jul 2022 21:26:30 +0000 Subject: games/exchess: Be explicit about needing signed chars. Fixes build on NetBSD/powerpc where "char" is unsigned. --- games/exchess/patches/patch-src_score.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 games/exchess/patches/patch-src_score.h diff --git a/games/exchess/patches/patch-src_score.h b/games/exchess/patches/patch-src_score.h new file mode 100644 index 00000000000..17cd517def9 --- /dev/null +++ b/games/exchess/patches/patch-src_score.h @@ -0,0 +1,16 @@ +$NetBSD: patch-src_score.h,v 1.1 2022/07/24 21:26:30 he Exp $ + +The piece_sq table depends on signed chars which isn't +the default on NetBSD/powerpc, so make that explicit. + +--- src/score.h.orig 2017-02-04 14:23:32.000000000 +0000 ++++ src/score.h +@@ -96,7 +96,7 @@ char attack_scale[16] = { 0, 1, 2, 4, 9, + // stage 3 = ending + + +-char piece_sq[4][7][64] = { // note values cannot exceed +127 or -127! ++signed char piece_sq[4][7][64] = { // note values cannot exceed +127 or -127! + + // Reading these is a little tricky. These tables + // are set up to look like a chess board from white's -- cgit v1.2.3