* modules/servent-tests (Depends-on): Add htonl.
(Makefile.am): Link program to $(HTONL_LIB).
* tests/test-servent.c (main): Fix formatting and typo.
2024-12-31 Collin Funk <collin.funk1@gmail.com>
+ servent tests: Fix failure due to missing htons declaration.
+ * modules/servent-tests (Depends-on): Add htonl.
+ (Makefile.am): Link program to $(HTONL_LIB).
+ * tests/test-servent.c (main): Fix formatting and typo.
+
servent: Make sure netdb.h is generated.
* modules/servent (Depends-on): Add netdb-h.
tests/signature.h
Depends-on:
+htonl
configure.ac:
Makefile.am:
TESTS += test-servent
check_PROGRAMS += test-servent
-test_servent_LDADD = $(LDADD) $(SERVENT_LIB)
+test_servent_LDADD = $(LDADD) $(SERVENT_LIB) $(HTONL_LIB)
if (result == NULL)
fputs ("getservbyname failed\n", stderr);
- result = getservbyport (htons(53), "tcp");
+ result = getservbyport (htons (53), "tcp");
if (result == NULL)
- fputs ("getportbyname failed\n", stderr);
+ fputs ("getservbyport failed\n", stderr);
return 0;
}