0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-10 12:01:15 +01:00

configure: Define HAVE_SODIUM in config.h on pkg found.

This commit is contained in:
Jason Volk 2019-06-06 03:54:37 -07:00
parent 4682e1fae4
commit 160734e3b4
2 changed files with 2 additions and 1 deletions

View file

@ -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])

View file

@ -215,7 +215,7 @@ ircd::buffer::operator<<(std::ostream &s, const buffer<it> &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)