aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh4
-rw-r--r--src/lpm.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 2dacd8f..762a3e8 100755
--- a/build.sh
+++ b/build.sh
@@ -15,8 +15,8 @@ CMAKE_DEFAULT_FLAGS=" $CMAKE_DEFAULT_FLAGS -DCMAKE_BUILD_TYPE=Release -DCMAKE_PR
mkdir -p lib/prefix/include lib/prefix/lib
if [[ "$@" != *"-lz"* ]]; then
[ ! -e "lib/zlib" ] && echo "Make sure you've cloned submodules. (git submodule update --init --depth=1)" && exit -1
- [ ! -e "lib/zlib/build" && $OSTYPE == 'msys'* ] && cd lib/zlib && mkdir build && cd build && ../configure --prefix=`pwd`/../../prefix && $MAKE -j $JOBS && $MAKE install && cd ../../../
- [ ! -e "lib/zlib/build" && $OSTYPE != 'msys'* ] && cd lib/zlib && mkdir build && $MAKE -f ../win32/Makefile.gcc -j $JOBS && cp *.a ../prefix/lib && cp *.h ../prefix/include && cd ../../
+ [[ ! -e "lib/zlib/build" && $OSTYPE != 'msys'* ]] && cd lib/zlib && mkdir build && cd build && ../configure --prefix=`pwd`/../../prefix && $MAKE -j $JOBS && $MAKE install && cd ../../../
+ [[ ! -e "lib/zlib/build" && $OSTYPE == 'msys'* ]] && cd lib/zlib && mkdir build && $MAKE -f ../win32/Makefile.gcc -j $JOBS && cp *.a ../prefix/lib && cp *.h ../prefix/include && cd ../../
LDFLAGS="$LDFLAGS -Llib/libz/build -l:libz.a" && CFLAGS="$CFLAGS -Ilib/prefix/include" && LDFLAGS="$LDFLAGS -Llib/prefix/lib -Llib/prefix/lib64"
fi
if [[ "$@" != *"-lmbedtls"* && "$@" != *"-lmbedcrypto"* ]]; then
diff --git a/src/lpm.c b/src/lpm.c
index 9666a1d..44cc7bf 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -19,7 +19,6 @@
#include <mbedtls/ctr_drbg.h>
#include <mbedtls/ssl.h>
#include <mbedtls/net.h>
-#include <arpa/inet.h>
#ifdef _WIN32
#include <direct.h>
@@ -30,6 +29,7 @@
#include <netinet/in.h>
#include <netdb.h>
#include <sys/socket.h>
+ #include <arpa/inet.h>
#define MAX_PATH PATH_MAX
#endif