Ai
1 Star 0 Fork 2

BuildOpenSource/busybox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
bb_getsockname.c 570 Bytes
一键复制 编辑 原始数据 按行查看 历史
Denys Vlasenko 提交于 2018-02-11 21:55 +08:00 . libbb: introduce and use bb_getsockname()
/* vi: set sw=4 ts=4: */
/*
* Utility routines.
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
//kbuild:lib-y += bb_getsockname.o
#include "libbb.h"
int FAST_FUNC bb_getsockname(int sockfd, void *addr, socklen_t addrlen)
{
/* The usefullness of this function is that for getsockname(),
* addrlen must go on stack (to _have_ an address to be passed),
* but many callers do not need its modified value.
* By using this shim, they can avoid unnecessary stack spillage.
*/
return getsockname(sockfd, (struct sockaddr *)addr, &addrlen);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/build-open-source/busybox.git
git@gitee.com:build-open-source/busybox.git
build-open-source
busybox
busybox
master

搜索帮助