forked from NetBSD/pkgsrc
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openrct2: Fix building on systems without alloca.h
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$NetBSD: patch-src_openrct2_core_String.cpp,v 1.3 2024/04/29 13:43:46 nia Exp $ | ||
|
||
All BSD-like platforms have alloca in stdlib.h. | ||
|
||
--- src/openrct2/core/String.cpp.orig 2024-04-29 10:11:22.368024600 +0000 | ||
+++ src/openrct2/core/String.cpp | ||
@@ -15,8 +15,10 @@ | ||
#include <stdexcept> | ||
#include <vector> | ||
#ifndef _WIN32 | ||
-# ifndef __FreeBSD__ | ||
+# if defined(__linux__) || defined(__sun) | ||
# include <alloca.h> | ||
+# else | ||
+# include <stdlib.h> | ||
# endif | ||
# include <unicode/ucnv.h> | ||
# include <unicode/unistr.h> |