From 2f514487cb297116f51084d41689cba1ced7fc25 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck Date: Tue, 4 Jun 2024 10:14:02 -0500 Subject: [PATCH] haiku: Basic fixes to build under Haiku --- Makefile | 5 +++++ kernel/yosys.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 96c133da9..308b1df30 100644 --- a/Makefile +++ b/Makefile @@ -143,6 +143,11 @@ LIBS += -lrt endif endif +ifeq ($(OS), Haiku) +# Allow usage of non-posix vasprintf, mkstemps functions +CXXFLAGS += -D_DEFAULT_SOURCE +endif + YOSYS_VER := 0.43+3 # Note: We arrange for .gitcommit to contain the (short) commit hash in diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 57433d0d9..fca2bca67 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -967,7 +967,7 @@ std::string proc_self_dirname() { return "/"; } -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__HAIKU__) char yosys_path[PATH_MAX]; char *yosys_argv0;