Skip to content

Commit ad0ef25

Browse files
committed
gh-121617: Include string.h in pwdmodule.c if _Py_TYPEOF is undefined
If _Py_TYPEOF is undefined, Py_CLEAR falls back to an implementation with memcpy() call; conditionally include the missing string.h dependency.
1 parent 65feded commit ad0ef25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Modules/pwdmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#include <pwd.h> // getpwuid()
1515
#include <unistd.h> // sysconf()
1616

17+
#ifndef _Py_TYPEOF
18+
# include <string.h> // memcpy()
19+
#endif
20+
1721
#include "clinic/pwdmodule.c.h"
1822
/*[clinic input]
1923
module pwd

0 commit comments

Comments
 (0)