Hello dev team,<br><br>I'm trying to compile app_python under kamailio 3.3.2 and gcc (Debian 4.7.2-4) 4.7.2 and I'm getting a bunch of warnings like: <br>CC (gcc) [M app_python.so] python_exec.o<br>CC (gcc) [M app_python.so] python_iface.o<br>
In file included from /usr/include/python2.7/Python.h:8:0,<br> from python_iface.c:28:<br>/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]<br>In file included from /usr/include/i386-linux-gnu/sys/types.h:26:0,<br>
from ../../route_struct.h:45,<br> from ../../action.h:42,<br> from python_iface.c:23:<br>/usr/include/features.h:214:0: note: this is the location of the previous definition<br>
CC (gcc) [M app_python.so] python_mod.o<br>In file included from /usr/include/python2.7/Python.h:8:0,<br> from python_iface.h:26,<br> from python_mod.c:27:<br>/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]<br>
In file included from /usr/include/dlfcn.h:23:0,<br> from ../../sr_module.h:60,<br> from python_mod.c:24:<br>/usr/include/features.h:214:0: note: this is the location of the previous definition<br>
<br>...<br><br><br>According to the Python documentation (<a href="http://docs.python.org/c-api/intro.html#includes">http://docs.python.org/c-api/intro.html#includes</a>), the include directive for “Python.h” should appear first in the C/C++ file. <br>
It doesn’t sound like a good idea to require this, but if you don’t put “Python.h” first, you might get compiler warnings like I mentioned above.<br><br>I've made a diff (against kamailio-3.3.2) for fixing that.<br>See attached.<br>
<br><br>