Skip to content

Commit

Permalink
Problem: HAVE_LIBSODIUM macro is inconsistent
Browse files Browse the repository at this point in the history
Solution: use ZMQ_USE_LIBSODIUM to match ZMQ_USE_TWEETNACL
  • Loading branch information
hintjens committed Mar 30, 2016
1 parent 6630a7c commit 6a78b3e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elseif (WITH_LIBSODIUM)
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries (libzmq ssp)
endif ()
set (HAVE_LIBSODIUM 1)
set (ZMQ_USE_LIBSODIUM 1)
set (ZMQ_HAVE_CURVE 1)
else ()
message (FATAL_ERROR
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ if test "x$enable_curve" = "xno"; then
elif test "x$with_libsodium" = "xyes"; then
AC_MSG_NOTICE([Using libsodium for CURVE security])
AC_DEFINE(ZMQ_HAVE_CURVE, [1], [Using curve encryption])
AC_DEFINE(HAVE_LIBSODIUM, [1], [Using libsodium for curve encryption])
AC_DEFINE(ZMQ_USE_LIBSODIUM, [1], [Using libsodium for curve encryption])
curve_library="libsodium"

# On Solaris, libsodium depends on libssp
Expand Down
2 changes: 1 addition & 1 deletion src/ctx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

#if defined (ZMQ_USE_TWEETNACL)
# include "tweetnacl.h"
#elif defined (HAVE_LIBSODIUM)
#elif defined (ZMQ_USE_LIBSODIUM)
# include "sodium.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/curve_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#if defined (ZMQ_USE_TWEETNACL)
# include "tweetnacl.h"
#elif defined (HAVE_LIBSODIUM)
#elif defined (ZMQ_USE_LIBSODIUM)
# include "sodium.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/curve_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#if defined (ZMQ_USE_TWEETNACL)
# include "tweetnacl.h"
#elif defined (HAVE_LIBSODIUM)
#elif defined (ZMQ_USE_LIBSODIUM)
# include "sodium.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/zmq_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#if defined (ZMQ_USE_TWEETNACL)
# include "tweetnacl.h"
#elif defined (HAVE_LIBSODIUM)
#elif defined (ZMQ_USE_LIBSODIUM)
# include "sodium.h"
#endif

Expand Down

0 comments on commit 6a78b3e

Please sign in to comment.