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:
parent
4682e1fae4
commit
160734e3b4
2 changed files with 2 additions and 1 deletions
|
@ -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])
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue