$OpenBSD$

Index: notmuch-restore.c
--- notmuch-restore.c.orig
+++ notmuch-restore.c
@@ -449,7 +449,7 @@ notmuch_restore_command (notmuch_config_t *config, int
     if (notmuch)
 	notmuch_database_destroy (notmuch);
 
-    if (input && gzclose_r (input)) {
+    if (input && gzclose (input)) {
 	fprintf (stderr, "Error closing %s: %s\n",
 		 name_for_error, gzerror (input, NULL));
 	ret = EXIT_FAILURE;
