Merge pull request #3655 from rubenk/macos-fixes

A few small build fixes for Mac OS
This commit is contained in:
David Lamparter 2019-01-24 13:51:37 +01:00 committed by GitHub
commit a28436ca47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 13 deletions

View File

@ -226,8 +226,8 @@ noinst_HEADERS += defaults.h
clean-local: clean-python clean-local: clean-python
.PHONY: clean-python .PHONY: clean-python
clean-python: clean-python:
find -name __pycache__ -o -name .pytest_cache | xargs rm -rf find . -name __pycache__ -o -name .pytest_cache | xargs rm -rf
find -name "*.pyc" -o -name "*_clippy.c" | xargs rm -f find . -name "*.pyc" -o -name "*_clippy.c" | xargs rm -f
redistclean: redistclean:
$(MAKE) distclean CONFIG_CLEAN_FILES="$(filter-out $(EXTRA_DIST), $(CONFIG_CLEAN_FILES))" $(MAKE) distclean CONFIG_CLEAN_FILES="$(filter-out $(EXTRA_DIST), $(CONFIG_CLEAN_FILES))"

View File

@ -346,7 +346,7 @@ AM_CONDITIONAL([STATIC_BIN], [test "x$enable_static_bin" = "xyes"])
dnl $AR and $RANLIB are set by LT_INIT above dnl $AR and $RANLIB are set by LT_INIT above
AC_MSG_CHECKING([whether $AR supports D option]) AC_MSG_CHECKING([whether $AR supports D option])
if $AR crD conftest.a; then if $AR crD conftest.a >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
dnl ARFLAGS is for automake, AR_FLAGS for libtool m-( dnl ARFLAGS is for automake, AR_FLAGS for libtool m-(
ARFLAGS="crD" ARFLAGS="crD"
@ -360,7 +360,7 @@ AC_SUBST([ARFLAGS])
AC_SUBST([AR_FLAGS]) AC_SUBST([AR_FLAGS])
AC_MSG_CHECKING([whether $RANLIB supports D option]) AC_MSG_CHECKING([whether $RANLIB supports D option])
if $RANLIB -D conftest.a; then if $RANLIB -D conftest.a >/dev/null 2>/dev/null; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
RANLIB="$RANLIB -D" RANLIB="$RANLIB -D"
else else
@ -817,6 +817,7 @@ fi
AM_CONDITIONAL([GIT_VERSION], [test "x$with_pkg_git_version" = "xyes"]) AM_CONDITIONAL([GIT_VERSION], [test "x$with_pkg_git_version" = "xyes"])
AC_CHECK_TOOL([OBJCOPY], [objcopy], [:]) AC_CHECK_TOOL([OBJCOPY], [objcopy], [:])
if test "x${OBJCOPY}" != "x:"; then
AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [ AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [
frr_cv_interp="" frr_cv_interp=""
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], [ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], [
@ -826,6 +827,7 @@ AC_CACHE_CHECK([for .interp value to use], [frr_cv_interp], [
test -f conftest.interp && rm conftest.interp test -f conftest.interp && rm conftest.interp
]) ])
]) ])
fi
if test -n "$frr_cv_interp"; then if test -n "$frr_cv_interp"; then
AC_DEFINE_UNQUOTED([INTERP], ["$frr_cv_interp"], [.interp value]) AC_DEFINE_UNQUOTED([INTERP], ["$frr_cv_interp"], [.interp value])
fi fi

View File

@ -124,7 +124,7 @@ int frr_pthread_set_name(struct frr_pthread *fpt)
#ifdef HAVE_PTHREAD_SETNAME_NP #ifdef HAVE_PTHREAD_SETNAME_NP
# ifdef GNU_LINUX # ifdef GNU_LINUX
ret = pthread_setname_np(fpt->thread, fpt->os_name); ret = pthread_setname_np(fpt->thread, fpt->os_name);
# else /* NetBSD */ # elif defined(__NetBSD__)
ret = pthread_setname_np(fpt->thread, fpt->os_name, NULL); ret = pthread_setname_np(fpt->thread, fpt->os_name, NULL);
# endif # endif
#elif defined(HAVE_PTHREAD_SET_NAME_NP) #elif defined(HAVE_PTHREAD_SET_NAME_NP)