我有 nanomsg 和 Android.mk 从这里。我尝试使用 Android NDK 为 Android 构建它。我有错误:
[armeabi] Compile thumb : nano <= usock.c
In file included from /home/roman/work/Nano/app/jni/src/aio/usock.c:28:0:
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc: In function 'nn_usock_recv_raw':
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc:1112:8: error: 'struct msghdr' has no member named 'msg_accrights'
hdr.msg_accrights = ctrl;
^
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc:1113:8: error: 'struct msghdr' has no member named 'msg_accrightslen'
hdr.msg_accrightslen = sizeof (int);
^
In file included from /home/roman/work/Nano/app/jni/src/aio/usock.c:28:0:
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc:1151:16: error: 'struct msghdr' has no member named 'msg_accrightslen'
if (hdr.msg_accrightslen > 0) {
^
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc:1152:46: error: 'struct msghdr' has no member named 'msg_accrightslen'
nn_assert (hdr.msg_accrightslen == sizeof (int));
^
In file included from /home/roman/work/Nano/app/jni/src/aio/usock.c:28:0:
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc:1154:45: error: 'struct msghdr' has no member named 'msg_accrights'
*self->in.pfd = *((int*) hdr.msg_accrights);
^
/home/roman/work/Nano/app/jni/src/aio/usock_posix.inc:1158:41: error: 'struct msghdr' has no member named 'msg_accrights'
nn_closefd (*((int*) hdr.msg_accrights));
^
make: *** [/home/roman/work/Nano/app/obj/local/armeabi/objs/nano/src/aio/usock.o] Error 1
什么是问题?我希望任何人都可以提供帮助。