Skip to content

Commit

Permalink
fix python3.10 compile bug on window (#44330)
Browse files Browse the repository at this point in the history
  • Loading branch information
betterpig committed Jul 15, 2022
1 parent ec38be6 commit 1f7f719
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions paddle/fluid/pybind/op_function_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ int main(int argc, char* argv[]) {
std::ofstream out(path + "op_function" + std::to_string(i + 1) + ".cc.tmp",
std::ios::out);

out << "#if defined(_MSC_VER)\n"
<< "#include <BaseTsd.h>\n"
<< "typedef SSIZE_T ssize_t;\n"
<< "#endif\n";

for (auto& header : headers) {
out << "#include " + header + "\n";
}
Expand Down

0 comments on commit 1f7f719

Please sign in to comment.