examples: fix prerequisites for debian
Change-Id: I760a2dd1b54101aed2405d005fb699800dc0059b
Reviewed-on: https://weave-review.googlesource.com/1481
Reviewed-by: Johan Euphrosine <proppy@google.com>
diff --git a/examples/prerequisites.sh b/examples/prerequisites.sh
index d1661d0..7358b71 100755
--- a/examples/prerequisites.sh
+++ b/examples/prerequisites.sh
@@ -6,10 +6,11 @@
DIR=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
ROOT_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
-sudo apt-get install ${APT_GET_OPTS} \
+sudo apt-get update && sudo apt-get install ${APT_GET_OPTS} \
autoconf \
automake \
binutils \
+ g++ \
gyp \
hostapd \
libavahi-client-dev \
@@ -17,6 +18,7 @@
libexpat1-dev \
libnl-3-dev \
libnl-route-3-dev \
+ libssl-dev \
libtool \
ninja-build \
|| exit 1
@@ -57,8 +59,10 @@
./autogen.sh || exit 1
./configure --disable-shared || exit 1
make || exit 1
-echo -e "\n\nTesting libevent...\nCan take several minutes.\n"
-make verify || exit 1
+if [ -z "$DISABLE_LIBEVENT_TEST" ]; then
+ echo -e "\n\nTesting libevent...\nCan take several minutes.\n"
+ make verify || exit 1
+fi
cp -rf include/* $ROOT_DIR/third_party/include/ || exit 1
cp -rf .libs/lib* $ROOT_DIR/third_party/lib/ || exit 1
rm -rf $ROOT_DIR/third_party/libevent
diff --git a/examples/provider/wifi_manager.cc b/examples/provider/wifi_manager.cc
index 6e216e4..ed6a9fd 100644
--- a/examples/provider/wifi_manager.cc
+++ b/examples/provider/wifi_manager.cc
@@ -42,7 +42,7 @@
WifiImpl::WifiImpl(provider::TaskRunner* task_runner, EventNetworkImpl* network)
: task_runner_{task_runner}, network_{network} {
- CHECK_EQ(0, getuid())
+ CHECK_EQ(0u, getuid())
<< "WiFi manager expects root access to control WiFi capabilities";
StopAccessPoint();
}