summaryrefslogtreecommitdiffstats
path: root/sysdep/linux/sysio.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-12-16 14:14:02 +0100
committerMartin Mares <mj@ucw.cz>1999-12-16 14:14:02 +0100
commita2867cd957c9282d47440a1f42a6b823f5c9e4b2 (patch)
treec70e344c00b20b4de6f5829aa2c7ceb352b50af0 /sysdep/linux/sysio.h
parent12a9d139eecea7e7fb5e73e82a2531c70894d4c8 (diff)
downloadbird-a2867cd957c9282d47440a1f42a6b823f5c9e4b2.tar
bird-a2867cd957c9282d47440a1f42a6b823f5c9e4b2.zip
Better order of includes.
set_inaddr() moved to sysio.h.
Diffstat (limited to 'sysdep/linux/sysio.h')
-rw-r--r--sysdep/linux/sysio.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdep/linux/sysio.h b/sysdep/linux/sysio.h
index bef8a61..58fb977 100644
--- a/sysdep/linux/sysio.h
+++ b/sysdep/linux/sysio.h
@@ -7,10 +7,25 @@
*/
#ifdef IPV6
+
#include <linux/in6.h> /* 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