소스 검색

Build fixes.

Adam Ierymenko 9 년 전
부모
커밋
f41ea24e97
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 0
      doc/build.sh
  2. 3 1
      osdep/ManagedRoute.cpp

+ 5 - 0
doc/build.sh

@@ -13,6 +13,11 @@ if [ -e /usr/bin/ronn ]; then
 	/usr/bin/ronn -r zerotier-idtool.1.md
 	/usr/bin/ronn -r zerotier-one.8.md
 else
+	if [ ! -f /usr/bin/node -a ! -f /usr/bin/nodejs ]; then
+		echo 'Unable to build man pages: no /usr/bin/ronn or /usr/bin/node / nodejs!'
+		exit 0
+	fi
+
 	if [ ! -f node_modules/marked-man/bin/marked-man ]; then
 		echo 'Installing MarkDown to ROFF converter...'
 		npm install marked-man

+ 3 - 1
osdep/ManagedRoute.cpp

@@ -41,7 +41,9 @@
 #include <arpa/inet.h>
 #include <net/route.h>
 #include <net/if.h>
+#ifdef __BSD__
 #include <net/if_dl.h>
+#endif
 #include <ifaddrs.h>
 #endif
 
@@ -264,7 +266,7 @@ static void _routeCmd(const char *op,const InetAddress &target,const InetAddress
 #endif // __WINDOWS__ --------------------------------------------------------
 
 #ifndef ZT_ROUTING_SUPPORT_FOUND
-#error ManagedRoute.cpp has no support for managing routes on this platform! You'll need to check and see if one of the existing ones will work and make sure proper defines are set, or write one. Please do a Github pull request if you do this for a new OS!
+#error "ManagedRoute.cpp has no support for managing routes on this platform! You'll need to check and see if one of the existing ones will work and make sure proper defines are set, or write one. Please do a Github pull request if you do this for a new OS."
 #endif
 
 } // anonymous namespace