Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
// libarchive
#include <archive.h>
// Pakfire
struct pakfire* pakfire;
+ // Time Created
+ time_t time_created;
+
// Format
pakfire_archive_writer_format format;
// Store the file handle
self->f = f;
+ // Fetch the creation time
+ self->time_created = time(NULL);
+ if (self->time_created < 0) {
+ r = -errno;
+ goto ERROR;
+ }
+
// Setup format
r = pakfire_archive_writer_setup_format(self, format);
if (r < 0)