Skip to content

Commit 32197d8

Browse files
authored
gh-162214: Define TARGET_OS_OSX macro in Modules/_testcapi/mem.c (#162220)
Example of fixed compiler warning when building Python with -Wundef: Modules/_testcapi/mem.c:802:5: warning: 'TARGET_OS_OSX' is not defined, evaluates to '0' [-Wundef] 802 | #if TARGET_OS_OSX || defined(__FreeBSD__)
1 parent fb9330b commit 32197d8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎Modules/_testcapi/mem.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# include <libproc.h> // proc_pidinfo(), PROC_PIDTASKINFO
1414
# include <sys/proc_info.h> // struct proc_taskinfo
1515
# endif
16+
#else
17+
# define TARGET_OS_OSX 0
1618
#endif
1719

1820
#ifdef __FreeBSD__

0 commit comments

Comments
 (0)