diff --git a/configure.ac b/configure.ac index 4f00f6636..d0bc0ed85 100644 --- a/configure.ac +++ b/configure.ac @@ -1047,6 +1047,7 @@ AC_HELP_STRING([--with-sodium-libs=[[[DIR]]]], [Path to sodium library directory PKG_CHECK_MODULES(SODIUM, libsodium, [ have_sodium="yes" + AC_DEFINE([HAVE_SODIUM], [1], [Have libsodium]) ], [ have_sodium="no" AC_MSG_ERROR([libsodium is required but not found. Try apt-get install libsodium-dev]) diff --git a/include/ircd/buffer/buffer.h b/include/ircd/buffer/buffer.h index f312625f7..223704f32 100644 --- a/include/ircd/buffer/buffer.h +++ b/include/ircd/buffer/buffer.h @@ -215,7 +215,7 @@ ircd::buffer::operator<<(std::ostream &s, const buffer &buffer) // We use the sodium_memzero() from libsodium in ircd/sodium.cc if available // to ensure cross-platform guarantees the zero'ing doesn't get optimized away. -#ifndef HAVE_SODIUM_H +#ifndef HAVE_SODIUM inline size_t __attribute__((always_inline)) ircd::buffer::zero(const mutable_buffer &buf)