Skip to content

Commit 67111fd

Browse files
committed
gh-91048: Guard against TARGET_OS_OSX for compat with simulators in remote_debug.h
1 parent cf8941c commit 67111fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/remote_debug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ typedef struct page_cache_entry {
100100
// Define a platform-independent process handle structure
101101
typedef struct {
102102
pid_t pid;
103-
#if defined(__APPLE__)
103+
#if defined(__APPLE__) && TARGET_OS_OSX
104104
mach_port_t task;
105105
#elif defined(MS_WINDOWS)
106106
HANDLE hProcess;
@@ -135,7 +135,7 @@ static mach_port_t pid_to_task(pid_t pid);
135135
static int
136136
_Py_RemoteDebug_InitProcHandle(proc_handle_t *handle, pid_t pid) {
137137
handle->pid = pid;
138-
#if defined(__APPLE__)
138+
#if defined(__APPLE__) && TARGET_OS_OSX
139139
handle->task = pid_to_task(handle->pid);
140140
#elif defined(MS_WINDOWS)
141141
handle->hProcess = OpenProcess(

0 commit comments

Comments
 (0)