forked from macports/macports-ports
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocaml-core_unix: use legacysupport correctly
- Loading branch information
1 parent
cb2d20c
commit 2394f76
Showing
3 changed files
with
13 additions
and
50 deletions.
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
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 |
---|---|---|
|
@@ -3,37 +3,15 @@ From: barracuda156 <[email protected]> | |
Date: Mon, 21 Nov 2022 01:13:02 +0800 | ||
Subject: [PATCH 2/2] core_unix_stubs.c: add legacysupport header for strnlen | ||
|
||
--- | ||
core_unix/src/core_unix_stubs.c | 7 +++++++ | ||
1 file changed, 7 insertions(+) | ||
|
||
diff --git a/core_unix/src/core_unix_stubs.c b/core_unix/src/core_unix_stubs.c | ||
index 4beba77..20976d2 100644 | ||
--- a/core_unix/src/core_unix_stubs.c | ||
+++ b/core_unix/src/core_unix_stubs.c | ||
@@ -64,6 +64,13 @@ | ||
#include <wordexp.h> | ||
#endif | ||
|
||
+#if defined(__APPLE__) | ||
+#include <AvailabilityMacros.h> | ||
+#if MAC_OS_X_VERSION_MAX_ALLOWED <= 1060 | ||
+#include <LegacySupport/string.h> | ||
+#endif | ||
+#endif | ||
+ | ||
CAMLprim value core_unix_error_of_code(value code) | ||
{ | ||
return unix_error_of_code(Int_val(code)); | ||
|
||
--- a/core_unix/src/dune 2023-04-25 21:12:26.000000000 +0800 | ||
+++ b/core_unix/src/dune 2023-10-25 20:09:45.000000000 +0800 | ||
+++ b/core_unix/src/dune 2024-07-06 22:50:49.000000000 +0800 | ||
@@ -1,10 +1,10 @@ | ||
(library (name core_unix) (public_name core_unix) | ||
(libraries core error_checking_mutex core_kernel.flags sexplib.unix | ||
- signal_unix spawn) | ||
- (c_flags (:standard -D_LARGEFILE64_SOURCE) ()) | ||
+ signal_unix spawn) (c_library_flags -lMacportsLegacySupport) | ||
(c_flags (:standard -D_LARGEFILE64_SOURCE) ()) | ||
+ (c_flags (:standard -D_LARGEFILE64_SOURCE) -I@PREFIX@/include/LegacySupport ()) | ||
(c_names nss_stubs timespec core_unix_stubs core_unix_time_stubs) | ||
(preprocess (pps ppx_jane ppx_optcomp)) (preprocessor_deps config.h)) | ||
|
||
|