Prevent compile errors on OSX (#198)

build CHANGE prevent compile errors on OSX

* Prevent compile errors on OSX

clangtidy cmake files too
fix possible buffer overflow too

* Fix travis build error

The imported include path setting is only later needed!

* Fix libssh version detection

Cmake variable is now LIBSSH_VERSION!

* python: do not put generated files into the source tree

Untracked content shows up in git submodules, causing stuff to be marked
"dirty" by various git-level tools.

Tested by temporarily putting the resulting target within `ALL`. The
result is the same as without this change (and it remains unusable with
no generated index, at least when building out-of-tree, BTW).

* apply review  notes

* Prevent compile errors on OSX

clangtidy cmake files too
fix possible buffer overflow too

* Fix travis build error

The imported include path setting is only later needed!

* Fix libssh version detection

Cmake variable is now LIBSSH_VERSION!

* apply review  notes

Co-authored-by: Jan Kundrát <jkt@flaska.net>
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index fb0dc85..412fbac 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -19,10 +19,14 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <pwd.h>
+#ifndef __APPLE__
 #include <shadow.h>
 #include <crypt.h>
+#endif
 #include <errno.h>
 #include <time.h>
+#include <fcntl.h>
+#include <unistd.h>
 
 #include "config.h"
 #include "session_server.h"
@@ -660,6 +664,7 @@
 static char *
 auth_password_get_pwd_hash(const char *username)
 {
+#ifndef __APPLE__
     struct passwd *pwd, pwd_buf;
     struct spwd *spwd, spwd_buf;
     char *pass_hash = NULL, buf[256];
@@ -698,6 +703,9 @@
     }
 
     return strdup(pass_hash);
+#else
+    return strdup("");
+#endif
 }
 
 static int