Android ndk CPython 3.8的交叉编译在插槽模块处失败
我试图使用Android NDK工具链和启用的\u socket模块交叉编译CPython 3.8,但不幸的是编译失败:Android ndk CPython 3.8的交叉编译在插槽模块处失败,android-ndk,cross-compiling,cpython,toolchain,Android Ndk,Cross Compiling,Cpython,Toolchain,我试图使用Android NDK工具链和启用的\u socket模块交叉编译CPython 3.8,但不幸的是编译失败: ../Modules/socketmodule.c:6739:5: error: invalid use of undefined type 'struct if_nameindex' for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) { ^ ../Modules/socketm
../Modules/socketmodule.c:6739:5: error: invalid use of undefined type 'struct if_nameindex'
for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) {
^
../Modules/socketmodule.c:6739:19: error: dereferencing pointer to incomplete type
for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) {
^
../Modules/socketmodule.c:6753:17: error: invalid use of undefined type 'struct if_nameindex'
ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
^
../Modules/socketmodule.c:6753:19: error: dereferencing pointer to incomplete type
ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
^
../Modules/socketmodule.c:6753:17: error: invalid use of undefined type 'struct if_nameindex'
ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
^
../Modules/socketmodule.c:6753:62: error: dereferencing pointer to incomplete type
ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
^
。/Modules/socketmodule.c:6739:5:错误:未定义类型“struct if\u nameindex”的使用无效
对于(i=0;ni[i]。如果索引!=0&&i
尽管整个交叉编译工作正常,但没有错误。有趣的是,交叉编译CPython 3.6的方式与包括\u socket模块的方式相同!没有编译错误。