about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/git/libcxx/0001-darwin-10.12-mbstate_t-fix.patch
blob: 0a2e8db07391c247c1eba2fcdfad192ac56049d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 9c1cb26c1dd3f92d1c1177e548107d2cd3c5e616 Mon Sep 17 00:00:00 2001
From: annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
Date: Fri, 23 Feb 2024 22:58:58 +0000
Subject: [PATCH] darwin 10.12 mbstate_t fix

https://github.com/llvm/llvm-project/issues/64226

removes space from
https://github.com/macports/macports-ports/raw/acd8acb171f1658596ed1cf25da48d5b932e2d19/lang/llvm-17/files/0042-mbstate_t-not-defined.patch
so it applies cleanly
---
 include/__mbstate_t.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/__mbstate_t.h b/include/__mbstate_t.h
index bfa6d61..5f51112 100644
--- a/include/__mbstate_t.h
+++ b/include/__mbstate_t.h
@@ -42,6 +42,9 @@
 #elif __has_include(<bits/types/mbstate_t.h>)
 #  include <bits/types/mbstate_t.h> // works on most Unixes
 #elif __has_include(<sys/_types/_mbstate_t.h>)
+#  if __has_include(<machine/_types.h>)
+#    include <machine/_types.h>
+#  endif
 #  include <sys/_types/_mbstate_t.h> // works on Darwin
 #elif !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS) && __has_include_next(<wchar.h>)
 #  include_next <wchar.h> // fall back to the C standard provider of mbstate_t
-- 
2.43.0