]> git.lizzy.rs Git - plan9front.git/blob - sys/src/ape/lib/bsd/getservbyaddr.c
ape: Add mkstemp to /sys/src/ape/lib/ap/gen/mkfile
[plan9front.git] / sys / src / ape / lib / bsd / getservbyaddr.c
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 }