+#define _POSIX_C_SOURCE 200809L
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void zpm_sqlite_error(struct zpm *zpm) {
zpm->error = 1;
if (zpm->errmsg) free(zpm->errmsg);
- zpm->errmsg = zpm_strdup((char *)sqlite3_errmsg(zpm->db));
+ zpm->errmsg = strdup(sqlite3_errmsg(zpm->db));
}
char *zpm_findpkg(struct zpm *zpm, char *pkgstr) {
switch (sqlite3_step(stmt)) {
case SQLITE_ROW:
- zpm->pkgid = zpm_strdup((char *)sqlite3_column_text(stmt, 0));
+ zpm->pkgid = strdup(sqlite3_column_text(stmt, 0));
break;
case SQLITE_DONE:
/* not found */