From a2867cd957c9282d47440a1f42a6b823f5c9e4b2 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 16 Dec 1999 13:14:02 +0000 Subject: Better order of includes. set_inaddr() moved to sysio.h. --- sysdep/linux/sysio.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sysdep/linux') diff --git a/sysdep/linux/sysio.h b/sysdep/linux/sysio.h index bef8a612..58fb9779 100644 --- a/sysdep/linux/sysio.h +++ b/sysdep/linux/sysio.h @@ -7,10 +7,25 @@ */ #ifdef IPV6 + #include /* FIXMEv6: glibc variant? */ +static inline void +set_inaddr(struct in6_addr *ia, ip_addr a) +{ + ipa_hton(a); + memcpy(ia, &a, sizeof(a)); +} + #else +static inline void +set_inaddr(struct in_addr *ia, ip_addr a) +{ + ipa_hton(a); + memcpy(&ia->s_addr, &a, sizeof(a)); +} + /* * Multicasting in Linux systems is a real mess. Not only different kernels * have different interfaces, but also different libc's export it in different -- cgit v1.2.3