Code

Fix compilation with GCC when _GNU_SOURCE isn't defined.
[sysdb.git] / src / tools / sysdbd / main.c
index ce54313542df26cd254847d601f01fc14413d74a..7bfbaa650c2888c5c30e183c89eb873768c5c8d3 100644 (file)
@@ -47,6 +47,7 @@
 #endif /* ! HAVE_LIBGEN_H */
 
 #include <errno.h>
+#include <time.h>
 
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -181,31 +182,6 @@ daemonize(void)
        return 0;
 } /* daemonize */
 
-static int
-store_init(void)
-{
-       sdb_store_t *store = sdb_store_create();
-
-       if (! store) {
-               sdb_log(SDB_LOG_ERR, "store: Failed to allocate store");
-               return -1;
-       }
-       if (sdb_plugin_register_writer("memstore",
-                               &sdb_store_writer, SDB_OBJ(store))) {
-               sdb_object_deref(SDB_OBJ(store));
-               return -1;
-       }
-       if (sdb_plugin_register_reader("memstore",
-                               &sdb_store_reader, SDB_OBJ(store))) {
-               sdb_object_deref(SDB_OBJ(store));
-               return -1;
-       }
-
-       /* Pass ownership to the plugins */
-       sdb_object_deref(SDB_OBJ(store));
-       return 0;
-} /* store_init */
-
 static int
 configure(void)
 {
@@ -219,10 +195,6 @@ configure(void)
                                        "\tCheck other error messages for details.");
                return 1;
        }
-       if (store_init()) {
-               sdb_log(SDB_LOG_ERR, "Failed to initialize the store");
-               return 1;
-       }
 
        if (! listen_addresses) {
                listen_addresses = default_listen_addresses;