Better order of includes.
set_inaddr() moved to sysio.h.
This commit is contained in:
parent
12a9d139ee
commit
a2867cd957
2 changed files with 16 additions and 16 deletions
|
@ -7,10 +7,25 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
|
|
||||||
#include <linux/in6.h> /* FIXMEv6: glibc variant? */
|
#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
|
#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
|
* Multicasting in Linux systems is a real mess. Not only different kernels
|
||||||
* have different interfaces, but also different libc's export it in different
|
* have different interfaces, but also different libc's export it in different
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "nest/iface.h"
|
#include "nest/iface.h"
|
||||||
|
|
||||||
#include "lib/unix.h"
|
#include "lib/unix.h"
|
||||||
|
#include "lib/sysio.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Random Numbers
|
* Random Numbers
|
||||||
|
@ -379,13 +380,6 @@ sk_new(pool *p)
|
||||||
|
|
||||||
#ifdef IPV6
|
#ifdef IPV6
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_inaddr(struct in6_addr *ia, ip_addr a)
|
|
||||||
{
|
|
||||||
ipa_hton(a);
|
|
||||||
memcpy(ia, &a, sizeof(a));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fill_in_sockaddr(sockaddr *sa, ip_addr a, unsigned port)
|
fill_in_sockaddr(sockaddr *sa, ip_addr a, unsigned port)
|
||||||
{
|
{
|
||||||
|
@ -408,13 +402,6 @@ get_sockaddr(sockaddr *sa, ip_addr *a, unsigned *port)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline void
|
|
||||||
set_inaddr(struct in_addr *ia, ip_addr a)
|
|
||||||
{
|
|
||||||
ipa_hton(a);
|
|
||||||
memcpy(&ia->s_addr, &a, sizeof(a));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fill_in_sockaddr(sockaddr *sa, ip_addr a, unsigned port)
|
fill_in_sockaddr(sockaddr *sa, ip_addr a, unsigned port)
|
||||||
{
|
{
|
||||||
|
@ -436,8 +423,6 @@ get_sockaddr(sockaddr *sa, ip_addr *a, unsigned *port)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lib/sysio.h"
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
sk_setup(sock *s)
|
sk_setup(sock *s)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue