Skip to content

Commit

Permalink
Use correct command to determine hostname on illumos/openindiana
Browse files Browse the repository at this point in the history
And detect openindiana properly
  • Loading branch information
pieterlexis committed Jun 8, 2016
1 parent da33305 commit 5b67925
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion m4/pdns_check_os.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_DEFUN([PDNS_CHECK_OS],[
THREADFLAGS=""
case "$host_os" in
solaris2.10)
solaris2.1*)
LIBS="-lposix4 -lpthread $LIBS"
CXXFLAGS="-D_REENTRANT $CXXFLAGS"
have_solaris="yes"
Expand Down
10 changes: 7 additions & 3 deletions m4/pdns_enable_reproducible.m4
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ AC_DEFUN([PDNS_ENABLE_REPRODUCIBLE], [
AC_DEFINE([REPRODUCIBLE], [1], [Define to 1 for reproducible builds])
],[
build_user=$(id -u -n)
if [ test x"$host_os" = "xSunOS" ]; then
case "$host_os" in
solaris2.1* | SunOS)
build_host_host=$(hostname)
build_host_domain=$(domainname)
build_host="$build_host_host.$build_host_domain"
else
;;
*)
build_host=$(hostname -f || hostname || echo 'localhost')
fi
;;
esac
AC_DEFINE_UNQUOTED([BUILD_HOST], ["$build_user@$build_host"], [Set to the user and host that builds PowerDNS])
])
])

0 comments on commit 5b67925

Please sign in to comment.