X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=m4%2Flttng_pthread_setname_np.m4;h=99fcc8d1e69d79d348f77d058e817619994227f6;hp=6eff705baa3b7a6d00f4c480d19f3c02f7d2b5b1;hb=3f3e7eb74963e75f9b0bb76b854d8be2dcbb0443;hpb=3d77491e0be54807044a17d673431cb1bada7b67 diff --git a/m4/lttng_pthread_setname_np.m4 b/m4/lttng_pthread_setname_np.m4 index 6eff705ba..99fcc8d1e 100644 --- a/m4/lttng_pthread_setname_np.m4 +++ b/m4/lttng_pthread_setname_np.m4 @@ -41,11 +41,14 @@ lttng_pthread_setname_np_save_LIBS="$LIBS" LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS" LIBS="$LIBS $PTHREAD_LIBS" -# GLIBC >= 2.12, Solaris >= 11.3 +# GLIBC >= 2.12, Solaris >= 11.3, FreeBSD >= 12.2 AC_MSG_CHECKING(for pthread_setname_np(pthread_t, const char*)) AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [#include ], + [[#include + #ifdef __FreeBSD__ + #include + #endif]], [pthread_setname_np(pthread_self(), "example")])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_WITH_TID,1, @@ -56,7 +59,10 @@ AC_LINK_IFELSE( AC_MSG_CHECKING(for pthread_setname_np(const char*)) AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [#include ], + [[#include + #ifdef __FreeBSD__ + #include + #endif]], [pthread_setname_np("example")])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID,1, @@ -67,8 +73,10 @@ AC_LINK_IFELSE( AC_MSG_CHECKING(for pthread_set_name_np(pthread_t, const char*)) AC_LINK_IFELSE( [AC_LANG_PROGRAM( - [#include - #include ], + [[#include + #ifdef __FreeBSD__ + #include + #endif]], [pthread_set_name_np(pthread_self(), "example")])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP_WITH_TID,1,