From: Victor Stinner Date: Tue, 16 Feb 2021 10:11:06 +0000 (+0100) Subject: Fix #426: Replace _Py_fopen() with fopen() in pythonmod.c X-Git-Tag: release-1.13.2rc1~270^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d01d82658ffc3992e4468472d3c8c080f8b16c;p=thirdparty%2Funbound.git Fix #426: Replace _Py_fopen() with fopen() in pythonmod.c The private _Py_fopen() function has been removed in Python 3.10. Fix build on Python 3.10. --- diff --git a/doc/Changelog b/doc/Changelog index 9ad100145..f855e5a9a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Fix #422: IPv6 fallback issues when IPv6 is not properly enabled/configured. - Fix to make tests work with support indicators set for iterator. + - Fix build on Python 3.10. 10 February 2021: Wouter - Merge PR #420 from dyunwei: DOH not responsing with diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index 040ff7051..6e60d02fe 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -338,7 +338,7 @@ int pythonmod_init(struct module_env* env, int id) PyFileObject = PyFile_FromString((char*)pe->fname, "r"); script_py = PyFile_AsFile(PyFileObject); #else - script_py = _Py_fopen(pe->fname, "r"); + script_py = fopen(pe->fname, "r"); #endif if (script_py == NULL) {