libucl/Makefile.am: set define _BSD_SOURCE
libucl/Makefile.am: set define _BSD_SOURCE

ucl_util.c includes <limits.h>, but the latter does not always provide PATH_MAX
automatically. For instance on musl at least one of

_POSIX_SOURCE
_POSIX_C_SOURCE
_XOPEN_SOURCE
_GNU_SOURCE
_BSD_SOURCE

needs to be defined for the defines to be turned on. When that is not the case
the compile breaks like shown below. To fix this define _BSD_SOURCE when
building lubucl. _BSD_SOURCE was chosen because rtpproxy has a BSD license and
libucl doesn't reference _BSD_SOURCE at all.

../external/libucl/src/ucl_util.c: In function 'ucl_include_url':
../external/libucl/src/ucl_util.c:914:14: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'INT8_MAX'?
  char urlbuf[PATH_MAX];
              ^~~~~~~~
              INT8_MAX
../external/libucl/src/ucl_util.c:914:14: note: each undeclared identifier is reported only once for each function it appears in
../external/libucl/src/ucl_util.c: In function 'ucl_include_file_single':
../external/libucl/src/ucl_util.c:987:15: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'INT8_MAX'?
  char filebuf[PATH_MAX], realbuf[PATH_MAX];
               ^~~~~~~~
               INT8_MAX
../external/libucl/src/ucl_util.c:188:22: warning: implicit declaration of function 'realpath'; did you mean 'realloc'? [-Wimplicit-function-declaration]
 #define ucl_realpath realpath
                      ^
../external/libucl/src/ucl_util.c:996:6: note: in expansion of macro 'ucl_realpath'
  if (ucl_realpath (filebuf, realbuf) == NULL) {
      ^~~~~~~~~~~~
../external/libucl/src/ucl_util.c:1059:21: warning: implicit declaration of function 'strdup'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
  parser->cur_file = strdup (realbuf);
                     ^~~~~~
                     strcmp
../external/libucl/src/ucl_util.c: In function 'ucl_include_file':
../external/libucl/src/ucl_util.c:1314:20: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'INT8_MAX'?
  char glob_pattern[PATH_MAX];
                    ^~~~~~~~
                    INT8_MAX
../external/libucl/src/ucl_util.c: In function 'ucl_include_common':
../external/libucl/src/ucl_util.c:1390:13: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'INT8_MAX'?
  char ipath[PATH_MAX];
             ^~~~~~~~
             INT8_MAX
../external/libucl/src/ucl_util.c: In function 'ucl_parser_set_filevars':
../external/libucl/src/ucl_util.c:1833:15: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'INT8_MAX'?
  char realbuf[PATH_MAX], *curdir;
               ^~~~~~~~
               INT8_MAX
../external/libucl/src/ucl_util.c: In function 'ucl_parser_add_file_full':
../external/libucl/src/ucl_util.c:1868:15: error: 'PATH_MAX' undeclared (first use in this function); did you mean 'INT8_MAX'?
  char realbuf[PATH_MAX];
               ^~~~~~~~
               INT8_MAX
../external/libucl/src/ucl_util.c: In function 'ucl_object_copy_internal':
../external/libucl/src/ucl_util.c:3459:36: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    new->trash_stack[UCL_TRASH_KEY] =
                                    ^
../external/libucl/src/ucl_util.c:3466:38: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    new->trash_stack[UCL_TRASH_VALUE] =
                                      ^
make[4]: *** [Makefile:615: libucl_a-ucl_util.o] Error 1

Signed-off-by: Sebastian Kemper <3a4b5ee1b268004463fb286f5abe712deb5f9da7@gmx.net>

dsanders11/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy