avoid crashes and lockups from daemon threads during interpreter shutdown (#1856)
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 6bfc175..c319c52 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -146,6 +146,8 @@
 PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
 PyAPI_FUNC(void) PyByteArray_Fini(void);
 
+PyAPI_DATA(PyThreadState *) _Py_Finalizing;
+
 /* Stuff with no proper home (yet) */
 PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, char *);
 PyAPI_DATA(int) (*PyOS_InputHook)(void);