免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4993 | 回复: 10
打印 上一主题 下一主题

[NetBSD] apue2的函数生成问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-01-22 14:59 |只看该作者 |倒序浏览
看了下apue2对应的
Make.defines.freebsd
Make.defines.linux
Make.defines.macos
Make.defines.solaris
make就会生成相应的函数

netbsd下如何操作阿?谢谢!

论坛徽章:
0
2 [报告]
发表于 2007-01-22 15:14 |只看该作者
If you are running on a system other than
FreeBSD, Linux, Mac OS X, or Solaris, you'll need to modify the makefiles
to include the settings for your system.  Also, you'll probably need to
modify the source code to get it to build on a different operating system.

论坛徽章:
0
3 [报告]
发表于 2007-01-22 15:15 |只看该作者
想省事的话,改一下systype.sh,让它echo freebsd就可以了。

论坛徽章:
0
4 [报告]
发表于 2007-01-22 16:23 |只看该作者
原帖由 雨丝风片 于 2007-1-22 15:14 发表
If you are running on a system other than
FreeBSD, Linux, Mac OS X, or Solaris, you'll need to modify the makefiles
to include the settings for your system.  Also, you'll probably need to
modify ...


这段我也看到了,但是具体怎么作,freebsd.mk简单改成netbsd.mk不知道行吗.
没有别的方法只好试试

[ 本帖最后由 ground 于 2007-1-22 16:25 编辑 ]

论坛徽章:
2
亥猪
日期:2014-03-19 16:36:35午马
日期:2014-11-23 23:48:46
5 [报告]
发表于 2007-01-22 16:32 |只看该作者
风雨正解

[ 本帖最后由 gvim 于 2007-1-22 16:42 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2007-01-22 17:20 |只看该作者
原帖由 ground 于 2007-1-22 16:23 发表


这段我也看到了,但是具体怎么作,freebsd.mk简单改成netbsd.mk不知道行吗.
没有别的方法只好试试


看3楼。

论坛徽章:
0
7 [报告]
发表于 2007-01-23 08:50 |只看该作者
make 出错:
recvfd2.c: In function `recv_ufd':
recvfd2.c:46: error: `LOCAL_PEERCRED' undeclared (first use in this function)
recvfd2.c:46: error: (Each undeclared identifier is reported only once
recvfd2.c:46: error: for each function it appears in.)
recvfd2.c:57: error: invalid application of `sizeof' to an incomplete type
recvfd2.c:60: error: invalid application of `sizeof' to an incomplete type
recvfd2.c:79: error: invalid application of `sizeof' to an incomplete type
recvfd2.c:93: error: dereferencing pointer to incomplete type
*** Error code 1


要用的libsource.c没有生成。

论坛徽章:
0
8 [报告]
发表于 2007-01-23 09:27 |只看该作者
原帖由 ground 于 2007-1-23 08:50 发表
make 出错:
recvfd2.c: In function `recv_ufd':
recvfd2.c:46: error: `LOCAL_PEERCRED' undeclared (first use in this function)
recvfd2.c:46: error: (Each undeclared identifier is reported only onc ...

NetBSD的setsockopt不支持LOCAL_PEERCRED。

论坛徽章:
0
9 [报告]
发表于 2007-01-23 10:30 |只看该作者
没有办法?

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
10 [报告]
发表于 2007-01-23 10:36 |只看该作者
原帖由 ground 于 2007-1-23 10:30 发表
没有办法?


我以前遇到这样的问题,一般而言,就是尽量找到 LOCAL_PEERCRED 的原型,然后自己手工加入进去。


当然,雨丝风片 老大的解决方案可能是一个不错的选择。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP