diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-10 02:17:16 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-10 02:17:16 +0000 |
commit | 334d807b924427434b42d4fbae745d3d1b38a218 (patch) | |
tree | 6daf12c1e2fa07d2ac6255ef4439e2fb95a57f57 /src/conn-tools/s6-getservbyname.c | |
parent | 43cb3ee4227de70e0225e9ac142b4d397f93cc41 (diff) | |
download | s6-networking-334d807b924427434b42d4fbae745d3d1b38a218.tar.xz |
Types fix, first pass
XXX marks what must change when skalibs changes.
Also started writing functions for client certificate support
in sbearssl, but it's not working yet (need more high-level
support from BearSSL before it can work)
Diffstat (limited to 'src/conn-tools/s6-getservbyname.c')
-rw-r--r-- | src/conn-tools/s6-getservbyname.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/conn-tools/s6-getservbyname.c b/src/conn-tools/s6-getservbyname.c index 0888df5..a7ccc9d 100644 --- a/src/conn-tools/s6-getservbyname.c +++ b/src/conn-tools/s6-getservbyname.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <stdint.h> #include <netdb.h> #include <skalibs/uint16.h> #include <skalibs/buffer.h> @@ -10,15 +11,15 @@ int main (int argc, char const *const *argv) { char fmt[UINT16_FMT] ; - uint16 port ; + uint16_t port ; PROG = "s6-getservbyname" ; if (argc < 3) strerr_dieusage(100, USAGE) ; if (!uint160_scan(argv[1], &port)) { struct servent *se = getservbyname(argv[1], argv[2]) ; - uint16 tmpport ; + uint16_t tmpport ; if (!se) return 1 ; - tmpport = (uint16)se->s_port ; + tmpport = (uint16_t)se->s_port ; uint16_unpack_big((char const *)&tmpport, &port) ; } if ((buffer_put(buffer_1small, fmt, uint16_fmt(fmt, port)) < 0) |