bochs: fix build on darwin

This commit is contained in:
Patrick
2025-06-21 22:11:23 +02:00
parent 103665f736
commit 0c0da739e5
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,15 @@
diff --git a/gui/keymap.cc b/gui/keymap.cc
index 3426b6b..7bf76d8 100644
--- a/gui/keymap.cc
+++ b/gui/keymap.cc
@@ -30,6 +30,10 @@
#include "gui.h"
#include "keymap.h"
+#if defined(__APPLE__)
+#include <libgen.h>
+#endif
+
// Table of bochs "BX_KEY_*" symbols
// the table must be in BX_KEY_* order
const char *bx_key_symbol[BX_KEY_NBKEYS] = {
+3
View File
@@ -32,6 +32,9 @@ stdenv.mkDerivation (finalAttrs: {
url = "mirror://sourceforge/project/bochs/bochs/${finalAttrs.version}/bochs-${finalAttrs.version}.tar.gz";
hash = "sha256-y29UK1HzWizJIGsqmA21YCt80bfPLk7U8Ras1VB3gao=";
};
# Fix build on darwin, remove on next version
# https://sourceforge.net/p/bochs/bugs/1466/
patches = lib.optional stdenv.hostPlatform.isDarwin ./fix-darwin-build.patch;
nativeBuildInputs = [
docbook_xml_dtd_45