diff --git a/src/gmnlm.c b/src/gmnlm.c
index d567a958702bed9413c746bd5b9f3024526fa92e..69b9a75ca1caab6f7e5f74685e550539be149ab6 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -1,6 +1,7 @@
#include <assert.h>
#include <ctype.h>
#include <getopt.h>
+#include <libgen.h>
#include <limits.h>
#include <openssl/bio.h>
#include <openssl/err.h>
@@ -127,8 +128,14 @@ {
const char *path_fmt = get_data_pathfmt();
static char path[PATH_MAX+1];
snprintf(path, sizeof(path), path_fmt, "bookmarks.gmi");
snprintf(path, sizeof(path), path_fmt, "bookmarks.gmi");
fprintf(stderr, "Error creating directory %s: %s\n",
dirname(path), strerror(errno));
return;
FILE *f = fopen(path, "a");
if (!f) {
fprintf(stderr, "Error opening %s for writing: %s\n",
text/gemini
This content has been proxied by September (3851b).