Skip to content

Commit fc436cf

Browse files
committed
update patch 2
1 parent 6661415 commit fc436cf

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

recipe/patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,47 @@
1-
From dec22f500af594289870ec2ecc08d3f3b7d034a0 Mon Sep 17 00:00:00 2001
1+
From eded359bf69fbfa86d1a3d703d0fe729b1d80e86 Mon Sep 17 00:00:00 2001
22
From: Isuru Fernando <isuruf@gmail.com>
33
Date: Sun, 12 Jan 2025 10:37:29 +0530
44
Subject: [PATCH 24/24] Do not define pid_t as it might conflict with the
55
actual definition
66

77
---
8+
Modules/_testcapi/long.c | 4 ++++
9+
Modules/_testcapimodule.c | 4 ++++
810
Modules/clinic/posixmodule.c.h | 4 ++++
911
Modules/posixmodule.c | 1 +
1012
PC/pyconfig.h.in | 2 --
11-
3 files changed, 5 insertions(+), 2 deletions(-)
13+
5 files changed, 13 insertions(+), 2 deletions(-)
1214

15+
diff --git a/Modules/_testcapi/long.c b/Modules/_testcapi/long.c
16+
index 769c3909ea3..c150516bcbc 100644
17+
--- a/Modules/_testcapi/long.c
18+
+++ b/Modules/_testcapi/long.c
19+
@@ -6,6 +6,10 @@
20+
#include "util.h"
21+
#include "clinic/long.c.h"
22+
23+
+#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM))
24+
+typedef int pid_t;
25+
+#endif
26+
+
27+
/*[clinic input]
28+
module _testcapi
29+
[clinic start generated code]*/
30+
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
31+
index 01b6bd89d13..fc587ed1681 100644
32+
--- a/Modules/_testcapimodule.c
33+
+++ b/Modules/_testcapimodule.c
34+
@@ -23,6 +23,10 @@
35+
# include <sys/wait.h> // W_STOPCODE
36+
#endif
37+
38+
+#if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM))
39+
+typedef int pid_t;
40+
+#endif
41+
+
42+
#ifdef bool
43+
# error "The public headers should not include <stdbool.h>, see gh-48924"
44+
#endif
1345
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
1446
index 14a6efb9ac9..7b67d867778 100644
1547
--- a/Modules/clinic/posixmodule.c.h
@@ -26,7 +58,7 @@ index 14a6efb9ac9..7b67d867778 100644
2658
"stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n"
2759
"--\n"
2860
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
29-
index 51e34b5f4b7..d88b1c7fee9 100644
61+
index 51e34b5f4b7..9ab26125548 100644
3062
--- a/Modules/posixmodule.c
3163
+++ b/Modules/posixmodule.c
3264
@@ -42,6 +42,7 @@

0 commit comments

Comments
 (0)