mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
build-sys: make build work under FreeBSD
Signed-off-by: Ryan Steinmetz <zi@freebsd.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
7c337de651
commit
1c40d8ac1e
2 changed files with 21 additions and 0 deletions
|
|
@ -26,11 +26,13 @@ LT_INIT
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([\
|
AC_CHECK_HEADERS([\
|
||||||
arpa/inet.h \
|
arpa/inet.h \
|
||||||
|
error.h \
|
||||||
fcntl.h \
|
fcntl.h \
|
||||||
langinfo.h \
|
langinfo.h \
|
||||||
libintl.h \
|
libintl.h \
|
||||||
netinet/in.h \
|
netinet/in.h \
|
||||||
stddef.h \
|
stddef.h \
|
||||||
|
stdio_ext.h \
|
||||||
stdlib.h \
|
stdlib.h \
|
||||||
string.h \
|
string.h \
|
||||||
strings.h \
|
strings.h \
|
||||||
|
|
@ -50,6 +52,8 @@ AC_TYPE_UINT32_T
|
||||||
AC_FUNC_MALLOC
|
AC_FUNC_MALLOC
|
||||||
AC_FUNC_REALLOC
|
AC_FUNC_REALLOC
|
||||||
AC_CHECK_FUNCS([\
|
AC_CHECK_FUNCS([\
|
||||||
|
__fpending \
|
||||||
|
error \
|
||||||
inet_ntoa \
|
inet_ntoa \
|
||||||
memset \
|
memset \
|
||||||
nl_langinfo \
|
nl_langinfo \
|
||||||
|
|
|
||||||
17
src/other.c
17
src/other.c
|
|
@ -53,13 +53,30 @@ extern void _exit();
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#ifdef HAVE_ERROR_H
|
||||||
#include <error.h>
|
#include <error.h>
|
||||||
|
#endif
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_STDIO_EXT_H
|
||||||
#include <stdio_ext.h>
|
#include <stdio_ext.h>
|
||||||
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifndef HAVE_ERROR
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#define error errc
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE___FPENDING
|
||||||
|
static size_t __fpending(FILE * fp)
|
||||||
|
{
|
||||||
|
return (fp->_p - fp->_bf._base);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Simple memory allocation wrapper */
|
/* Simple memory allocation wrapper */
|
||||||
void *safe_malloc(const size_t size)
|
void *safe_malloc(const size_t size)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue