Skip to content
Commits on Source (2)
......@@ -4,7 +4,30 @@
#ifndef GUARD_NTP_INTRES_H
#define GUARD_NTP_INTRES_H
#include <ntp_worker.h>
#include "ntp_worker.h"
#include "ntp_malloc.h"
struct addrinfo *copy_addrinfo_impl(const struct addrinfo *
#ifdef EREALLOC_CALLSITE /* from ntp_malloc.h */
,
const char *, int
#endif
);
struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
#ifdef EREALLOC_CALLSITE /* from ntp_malloc.h */
,
const char *, int
#endif
);
#ifdef EREALLOC_CALLSITE
# define copy_addrinfo(l) \
copy_addrinfo_impl((l), __FILE__, __LINE__)
# define copy_addrinfo_list(l) \
copy_addrinfo_list_impl((l), __FILE__, __LINE__)
#else
# define copy_addrinfo(l) copy_addrinfo_impl(l)
# define copy_addrinfo_list(l) copy_addrinfo_list_impl(l)
#endif
#ifdef USE_WORKER
#define INITIAL_DNS_RETRY 2 /* seconds between queries */
......
......@@ -74,28 +74,6 @@
#include "ntp_types.h"
#include "ntp_malloc.h"
struct addrinfo *copy_addrinfo_impl(const struct addrinfo *
#ifdef EREALLOC_CALLSITE /* from ntp_malloc.h */
,
const char *, int
#endif
);
struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
#ifdef EREALLOC_CALLSITE /* from ntp_malloc.h */
,
const char *, int
#endif
);
#ifdef EREALLOC_CALLSITE
# define copy_addrinfo(l) \
copy_addrinfo_impl((l), __FILE__, __LINE__)
# define copy_addrinfo_list(l) \
copy_addrinfo_list_impl((l), __FILE__, __LINE__)
#else
# define copy_addrinfo(l) copy_addrinfo_impl(l)
# define copy_addrinfo_list(l) copy_addrinfo_list_impl(l)
#endif
/*
* If various macros are not defined we need to define them
*/
......@@ -150,13 +128,4 @@ struct addrinfo *copy_addrinfo_list_impl(const struct addrinfo *
# define Z_AI_NUMERICSERV AI_NUMERICSERV
#endif
/*
* Set up some macros to look for IPv6 and IPv6 multicast
*/
#if defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
# define USE_IPV6_MULTICAST_SUPPORT
#endif /* IPV6 Multicast Support */
#endif /* !GUARD_NTP_RFC2553_H */
......@@ -49,7 +49,12 @@
#define IFS_CREATED 2 /* was just created */
#define IFS_DELETED 3 /* was just delete */
/*
* Set up some macros to look for IPv6 and IPv6 multicast
*/
#if defined(IPV6_JOIN_GROUP) && defined(IPV6_LEAVE_GROUP)
# define USE_IPV6_MULTICAST_SUPPORT
#endif /* IPV6 Multicast Support */
/*
* setsockopt does not always have the same arg declaration
......