Skip to content

Commit

Permalink
Workaround linker bug in libnoise-c
Browse files Browse the repository at this point in the history
  • Loading branch information
jpf91 committed Mar 30, 2017
1 parent eab3653 commit 491bb10
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -8,7 +8,7 @@ d:

before_install:
- sudo apt-get -qq update
- sudo apt-get install make build-essential pkg-config libtool autoconf automake gettext libevent-dev -y
- sudo apt-get install make build-essential pkg-config libtool autoconf automake gettext libevent-dev libssl-dev -y

install:
- wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.3.1/doveralls_linux_travis"
Expand Down
23 changes: 23 additions & 0 deletions noise-c.patch
@@ -0,0 +1,23 @@
diff --git a/src/protocol/internal.c b/src/protocol/internal.c
index 28e97e6..58e33d6 100644
--- a/src/protocol/internal.c
+++ b/src/protocol/internal.c
@@ -28,8 +28,6 @@ NoiseCipherState *noise_aesgcm_new_sodium(void);
#endif
#if USE_OPENSSL
NoiseCipherState *noise_aesgcm_new_openssl(void);
-#else
-NoiseCipherState *noise_aesgcm_new_ref(void);
#endif

/**
@@ -47,9 +45,6 @@ NoiseCipherState *noise_aesgcm_new(void)
#if USE_OPENSSL
if (!state)
state = noise_aesgcm_new_openssl();
-#else
- if (!state)
- state = noise_aesgcm_new_ref();
#endif

return state;
5 changes: 3 additions & 2 deletions travis-ci.sh
@@ -1,5 +1,7 @@
#!/bin/bash

BASEDIR=${PWD}

git clone git://github.com/jedisct1/libsodium.git
pushd libsodium
git checkout 1.0.12
Expand All @@ -11,12 +13,11 @@ popd

git clone https://github.com/rweather/noise-c.git
pushd noise-c
patch -p1 -i ${BASEDIR}/noise-c.patch
./autogen.sh
./configure --with-libsodium --prefix=/usr
pushd src
make
sudo make install
popd
popd

dub test -b unittest-cov --combined
Expand Down

0 comments on commit 491bb10

Please sign in to comment.