diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2015-09-17 15:21:27 +0000 | 
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2015-09-17 15:21:27 +0000 | 
| commit | af3dabbf15fa4d0e7e45a43fbf9a2195edfa941c (patch) | |
| tree | ee00f42bccdce0e3581d05a17f58bb7429f0ceda /pythonmod/pythonmod.c | |
| parent | 0ea28240053521a309698413a426b4d730a3d60c (diff) | |
Notes
Diffstat (limited to 'pythonmod/pythonmod.c')
| -rw-r--r-- | pythonmod/pythonmod.c | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/pythonmod/pythonmod.c b/pythonmod/pythonmod.c index 359eea0c6553..48dbc01698cb 100644 --- a/pythonmod/pythonmod.c +++ b/pythonmod/pythonmod.c @@ -45,7 +45,7 @@  #endif  #include "config.h" -#include "ldns/sbuffer.h" +#include "sldns/sbuffer.h"  #undef _POSIX_C_SOURCE  #undef _XOPEN_SOURCE @@ -133,7 +133,13 @@ int pythonmod_init(struct module_env* env, int id)     /* Initialize Python libraries */     if (!Py_IsInitialized())      { -      Py_SetProgramName("unbound"); +#if PY_MAJOR_VERSION >= 3 +      wchar_t progname[8]; +      mbstowcs(progname, "unbound", 8); +#else +      char *progname = "unbound"; +#endif +      Py_SetProgramName(progname);        Py_NoSiteFlag = 1;        Py_Initialize();        PyEval_InitThreads();  | 
