summaryrefslogtreecommitdiff
path: root/src/conn-tools/s6-getservbyname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conn-tools/s6-getservbyname.c')
-rw-r--r--src/conn-tools/s6-getservbyname.c7
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)