Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/bsd/getservbyaddr.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <sys/types.h>
2
#include <unistd.h>
3
#include <stdio.h>
4
 
5
/* bsd extensions */
6
#include <sys/uio.h>
7
#include <sys/socket.h>
8
#include <netinet/in.h>
9
#include <netdb.h>
10
 
11
struct servent*
12
getservbyport(int port, char *proto)
13
{
14
	char buf[32];
15
 
16
	snprintf(buf, sizeof buf, "%d", port);
17
	return getservbyname(buf, proto);
18
}