mirror of https://github.com/getdnsapi/getdns.git
Fix libidn really absent + NetBSD fixes
This commit is contained in:
parent
0a717f5d51
commit
de59b700ce
27
configure.ac
27
configure.ac
|
@ -877,7 +877,7 @@ dnl ----- Start of "Things needed for gldns" section
|
|||
dnl -----
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
AC_CHECK_HEADERS([stdarg.h stdint.h netinet/in.h arpa/inet.h netdb.h sys/socket.h time.h sys/time.h bsd/string.h],,, [AC_INCLUDES_DEFAULT])
|
||||
AC_CHECK_HEADERS([stdarg.h stdint.h netinet/in.h arpa/inet.h netdb.h sys/socket.h time.h sys/time.h bsd/string.h sys/select.h],,, [AC_INCLUDES_DEFAULT])
|
||||
|
||||
dnl Check the printf-format attribute (if any)
|
||||
dnl result in HAVE_ATTR_FORMAT.
|
||||
|
@ -975,6 +975,14 @@ AC_SUBST(C99COMPATFLAGS)
|
|||
|
||||
AH_BOTTOM([
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_BSD_STRING_H
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -985,11 +993,13 @@ extern "C" {
|
|||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
|
||||
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY || !defined(strlcpy)
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#else
|
||||
#ifndef __BSD_VISIBLE
|
||||
#define __BSD_VISIBLE 1
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM
|
||||
uint32_t arc4random(void);
|
||||
#endif
|
||||
|
@ -1030,11 +1040,6 @@ unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
|
|||
# define GLDNS_BUILD_CONFIG_HAVE_SSL 1
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_STDARG_H
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
@ -1045,6 +1050,10 @@ unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
|
|||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
@ -1092,10 +1101,6 @@ unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BSD_STRING_H
|
||||
#include <bsd/string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBUNBOUND
|
||||
#include <unbound.h>
|
||||
#endif
|
||||
|
|
|
@ -702,7 +702,7 @@ set_os_defaults(struct getdns_context *context)
|
|||
token = parse + strcspn(parse, " \t\r\n");
|
||||
*token = 0;
|
||||
|
||||
(void) strcpy(domain, parse);
|
||||
(void) strlcpy(domain, parse, sizeof(domain));
|
||||
|
||||
} else if (strncmp(parse, "search", 6) == 0) {
|
||||
parse += 6;
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <locale.h>
|
||||
#include <stringprep.h>
|
||||
#include "config.h"
|
||||
#ifdef HAVE_LIBIDN
|
||||
#include <stringprep.h>
|
||||
#include <idna.h>
|
||||
#endif
|
||||
#include "getdns/getdns.h"
|
||||
|
|
Loading…
Reference in New Issue