summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/Makefile.inc
diff options
context:
space:
mode:
authornaddy <>2024-04-15 14:30:48 +0000
committernaddy <>2024-04-15 14:30:48 +0000
commitf7646eb021595fb6f85c38b99e043277fa2436bc (patch)
tree161adc5a1fbde78ccfb6b293bd0da5239b8b5045 /src/lib/libc/net/Makefile.inc
parent22372f5970deb0d15444f4ce803b5a44934b22e5 (diff)
downloadopenbsd-f7646eb021595fb6f85c38b99e043277fa2436bc.tar.gz
openbsd-f7646eb021595fb6f85c38b99e043277fa2436bc.tar.bz2
openbsd-f7646eb021595fb6f85c38b99e043277fa2436bc.zip
drop htonl(), htons(), ntohl(), ntohs() MD functions from libc
Userland code compiled in a normal fashion picks up the htonl(), htons(), ntohl(), ntohs() macros implemented by endian.h. The functions in libc are effectively unused. Keep the MI functions in case something looks for the symbols in libc or plays games with #undef, but change them to wrap the implementation from endian.h. tweaks suggested by claudio@, ok miod@
Diffstat (limited to '')
-rw-r--r--src/lib/libc/net/Makefile.inc15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib/libc/net/Makefile.inc b/src/lib/libc/net/Makefile.inc
index 41a3164d6a..db2c75dad6 100644
--- a/src/lib/libc/net/Makefile.inc
+++ b/src/lib/libc/net/Makefile.inc
@@ -1,7 +1,7 @@
1# $OpenBSD: Makefile.inc,v 1.60 2019/08/30 18:33:17 deraadt Exp $ 1# $OpenBSD: Makefile.inc,v 1.61 2024/04/15 14:30:48 naddy Exp $
2 2
3# net sources 3# net sources
4.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}/net ${LIBCSRCDIR}/net 4.PATH: ${LIBCSRCDIR}/net
5 5
6CFLAGS+=-DRESOLVSORT 6CFLAGS+=-DRESOLVSORT
7 7
@@ -10,10 +10,11 @@ SRCS+= base64.c ethers.c freeaddrinfo.c \
10 getifaddrs.c getnameinfo.c getnetent.c \ 10 getifaddrs.c getnameinfo.c getnetent.c \
11 getnetnamadr.c getpeereid.c getproto.c getprotoent.c getprotoname.c \ 11 getnetnamadr.c getpeereid.c getproto.c getprotoent.c getprotoname.c \
12 getservbyname.c getservbyport.c getservent.c getrrsetbyname.c \ 12 getservbyname.c getservbyport.c getservent.c getrrsetbyname.c \
13 herror.c if_indextoname.c if_nameindex.c if_nametoindex.c inet_addr.c \ 13 herror.c htonl.c htons.c \
14 if_indextoname.c if_nameindex.c if_nametoindex.c inet_addr.c \
14 inet_lnaof.c inet_makeaddr.c inet_neta.c inet_netof.c inet_network.c \ 15 inet_lnaof.c inet_makeaddr.c inet_neta.c inet_netof.c inet_network.c \
15 inet_net_ntop.c inet_net_pton.c inet_ntoa.c inet_ntop.c inet_pton.c \ 16 inet_net_ntop.c inet_net_pton.c inet_ntoa.c inet_ntop.c inet_pton.c \
16 linkaddr.c rcmd.c rcmdsh.c ruserok.c \ 17 linkaddr.c ntohl.c ntohs.c rcmd.c rcmdsh.c ruserok.c \
17 rresvport.c recv.c res_comp.c res_data.c \ 18 rresvport.c recv.c res_comp.c res_data.c \
18 res_debug.c res_debug_syms.c res_init.c res_mkquery.c res_query.c \ 19 res_debug.c res_debug_syms.c res_init.c res_mkquery.c res_query.c \
19 res_random.c res_send.c \ 20 res_random.c res_send.c \
@@ -22,12 +23,6 @@ SRCS+= base64.c ethers.c freeaddrinfo.c \
22# IPv6 23# IPv6
23SRCS+= ip6opt.c rthdr.c vars6.c 24SRCS+= ip6opt.c rthdr.c vars6.c
24 25
25# machine-dependent net sources
26# m-d Makefile.inc must include sources for:
27# htonl() htons() ntohl() ntohs()
28
29.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/net/Makefile.inc"
30
31MAN+= htobe64.3 ether_aton.3 gai_strerror.3 getaddrinfo.3 gethostbyname.3 \ 26MAN+= htobe64.3 ether_aton.3 gai_strerror.3 getaddrinfo.3 gethostbyname.3 \
32 getifaddrs.3 getnameinfo.3 getnetent.3 getpeereid.3 getprotoent.3 \ 27 getifaddrs.3 getnameinfo.3 getnetent.3 getpeereid.3 getprotoent.3 \
33 getrrsetbyname.3 getservent.3 htonl.3 if_indextoname.3 \ 28 getrrsetbyname.3 getservent.3 htonl.3 if_indextoname.3 \