Merge branch 'master' into int-new

This commit is contained in:
Ondrej Zajicek (work) 2017-05-09 17:37:38 +02:00
commit fd1f355b7b
3 changed files with 14 additions and 21 deletions

12
INSTALL
View file

@ -9,13 +9,23 @@ Default location for configuration file is /usr/local/etc/bird.conf and
for control socket is /usr/local/var/run/bird.ctl . You can change that for control socket is /usr/local/var/run/bird.ctl . You can change that
by --sysconfdir and --localstatedir configure options. by --sysconfdir and --localstatedir configure options.
To compile current development BIRD source code from Git repository, you
also need Git (to download the source code) and Autoconf (to generate
the configure script and associated files using 'autoreconf' tool):
$ git clone git://git.nic.cz/bird.git
$ cd bird
$ autoreconf
Then continue as in usual installation above.
Requirements Requirements
============ ============
For compiling BIRD you need these programs and libraries: For compiling BIRD you need these programs and libraries:
- GNU C Compiler - GNU C Compiler (or LLVM Clang)
- GNU Make - GNU Make
- GNU Bison - GNU Bison
- GNU M4 - GNU M4

View file

@ -218,28 +218,11 @@ case $sysdesc in
esac esac
AC_CHECK_HEADERS_ONCE([alloca.h syslog.h]) AC_CHECK_HEADERS_ONCE([alloca.h syslog.h])
AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#include <sys/socket.h>])
AC_CHECK_HEADER([linux/lwtunnel.h], [AC_DEFINE([HAVE_LWTUNNEL], [1], [Define to 1 if you have the <linux/lwtunnel.h> header file.])]) AC_CHECK_HEADER([linux/lwtunnel.h], [AC_DEFINE([HAVE_LWTUNNEL], [1], [Define to 1 if you have the <linux/lwtunnel.h> header file.])])
AC_CHECK_MEMBERS([struct rtvia.rtvia_family], [AC_DEFINE([HAVE_STRUCT_RTVIA], [1], [Define to 1 if you have rtvia structure.])],,[#include <linux/rtnetlink.h>]) AC_CHECK_MEMBERS([struct rtvia.rtvia_family], [AC_DEFINE([HAVE_STRUCT_RTVIA], [1], [Define to 1 if you have rtvia structure.])],,[#include <linux/rtnetlink.h>])
AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM(
[[
#include <sys/types.h>
#include <sys/socket.h>
]],
[[
static struct sockaddr sa;
int i = sizeof(sa.sa_len);
]]
)],
[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SIN_LEN,,sin_len)
],
[AC_MSG_RESULT(no)]
)
AC_C_BIGENDIAN( AC_C_BIGENDIAN(
[AC_DEFINE([CPU_BIG_ENDIAN], [1], [Define to 1 if cpu is big endian])], [AC_DEFINE([CPU_BIG_ENDIAN], [1], [Define to 1 if cpu is big endian])],
[AC_DEFINE([CPU_LITTLE_ENDIAN], [1], [Define to 1 if cpu is little endian])], [AC_DEFINE([CPU_LITTLE_ENDIAN], [1], [Define to 1 if cpu is little endian])],

View file

@ -516,7 +516,7 @@ static inline void
sockaddr_fill4(struct sockaddr_in *sa, ip_addr a, uint port) sockaddr_fill4(struct sockaddr_in *sa, ip_addr a, uint port)
{ {
memset(sa, 0, sizeof(struct sockaddr_in)); memset(sa, 0, sizeof(struct sockaddr_in));
#ifdef HAVE_SIN_LEN #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN
sa->sin_len = sizeof(struct sockaddr_in); sa->sin_len = sizeof(struct sockaddr_in);
#endif #endif
sa->sin_family = AF_INET; sa->sin_family = AF_INET;