Code

Fix compilation with GCC when _GNU_SOURCE isn't defined.
[sysdb.git] / src / tools / sysdb / main.c
index c58c735675106da0ebc33afd94680cc7478dfc89..f502027f04353e115dd427cdd429816569a16116 100644 (file)
@@ -41,6 +41,7 @@
 #include "utils/ssl.h"
 
 #include <errno.h>
+#include <time.h>
 
 #if HAVE_LIBGEN_H
 #      include <libgen.h>
@@ -297,7 +298,8 @@ main(int argc, char **argv)
        if (! input.user)
                exit(1);
 
-       sdb_ssl_init();
+       if (sdb_ssl_init())
+               exit(1);
 
        input.client = sdb_client_create(host);
        if (! input.client) {
@@ -329,8 +331,10 @@ main(int argc, char **argv)
        }
 
        sdb_log(SDB_LOG_INFO, "SysDB client "SDB_CLIENT_VERSION_STRING
-                       SDB_CLIENT_VERSION_EXTRA" (libsysdbclient %s%s)\n",
+                       SDB_CLIENT_VERSION_EXTRA" (libsysdbclient %s%s)",
                        sdb_client_version_string(), sdb_client_version_extra());
+       sdb_command_print_server_version(&input);
+       printf("\n");
 
        using_history();