Skip to content

Commit

Permalink
ccan: fix HAVE_BSWAP_64 for autoconf.
Browse files Browse the repository at this point in the history
Autoconf defines HAVE_BSWAP_64_DECL, we want HAVE_BSWAP_64.

Signed-off-by: Rusty Russell <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
rustyrussell authored and jrasamba committed Apr 3, 2013
1 parent b5d5b9a commit 5dad084
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/ccan/libccan.m4
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,18 @@ if test x"$samba_cv_warn_unused_result" = xyes ; then
AC_DEFINE(HAVE_WARN_UNUSED_RESULT, 1,
[whether we have __attribute__((warn_unused_result))])
fi
AC_HAVE_DECL(bswap_64, [#include <byteswap.h>])

AC_CACHE_CHECK([whether we have bswap_64],
samba_cv_have_bswap_64,
[
AC_LINK_IFELSE([AC_LANG_SOURCE(
[#include <byteswap.h>
int main(void) { return bswap_64(1) ? 0 : 1; }
])],
samba_cv_have_bswap_64=yes)
])

if test x"$samba_cv_have_bswap_64" = xyes ; then
AC_DEFINE(HAVE_BSWAP_64, 1,
[whether we have bswap_64])
fi

0 comments on commit 5dad084

Please sign in to comment.