From dc10ed62afe8b35f03ef8e6603ea36b89f15a7e8 Mon Sep 17 00:00:00 2001 From: Nazarenko Mykyta Volodymyrovych Date: Fri, 4 Sep 2026 09:54:52 +0000 Subject: [PATCH 1/4] [ OpenBSD ] -> #include --- src/auth.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/auth.cpp b/src/auth.cpp index ab8f910..3a7438a 100644 --- a/src/auth.cpp +++ b/src/auth.cpp @@ -13,6 +13,10 @@ #include +#if defined(__OpenBSD__) +#include +#endif + #include "cacheutil.h" #include "config.h" #include "crypto.h" From 9c95d4cea4d4eac0c4bcbe576da164b6e74a7dbc Mon Sep 17 00:00:00 2001 From: Nazarenko Mykyta Volodymyrovych Date: Fri, 4 Sep 2026 09:56:16 +0000 Subject: [PATCH 2/4] [ OpenBSD ] -> #include --- src/log.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/log.h b/src/log.h index 342ca36..63aa0eb 100644 --- a/src/log.h +++ b/src/log.h @@ -7,6 +7,10 @@ #pragma once +#if defined(__OpenBSD__) +#include +#endif + #include #include From c5ffbe070fe38b0db38ffa27a98d67e2c6678fd3 Mon Sep 17 00:00:00 2001 From: Nazarenko Mykyta Volodymyrovych Date: Fri, 4 Sep 2026 10:18:03 +0000 Subject: [PATCH 3/4] [ OpenBSD ] -> Use glob instead of wordexp --- src/util.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index e1e8a92..19eda68 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -26,7 +26,13 @@ #include #include #include + +#if defined(__OpenBSD__) +#include +#include +#else #include +#endif #include #include @@ -140,6 +146,23 @@ std::string Util::ExpandPath(const std::string& p_Path) if ((p_Path.at(0) != '~') && ((p_Path.at(0) != '$'))) return p_Path; +#if defined(__OpenBSD__) + glob_t gl; + std::string rv; + if ((glob(p_Path.c_str(), GLOB_TILDE | GLOB_NOCHECK, nullptr, &gl) == 0) && (gl.gl_pathc > 0)) + { + rv = std::string(gl.gl_pathv[0]); + for (size_t i = 1; i < gl.gl_pathc; ++i) + { + rv += " " + std::string(gl.gl_pathv[i]); + } + globfree(&gl); + } + else + { + rv = p_Path; + } +#else wordexp_t exp; std::string rv; if ((wordexp(p_Path.c_str(), &exp, WRDE_NOCMD) == 0) && (exp.we_wordc > 0)) @@ -155,7 +178,7 @@ std::string Util::ExpandPath(const std::string& p_Path) { rv = p_Path; } - +#endif return rv; } From dd0c5a0bcb555aa2d1c57e24b1e5033adea8e4f3 Mon Sep 17 00:00:00 2001 From: Kristofer Berggren Date: Sat, 12 Sep 2026 14:35:53 +0800 Subject: [PATCH 4/4] follow-up openbsd build fixes - bump version --- src/nmail.1 | 2 +- src/version.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nmail.1 b/src/nmail.1 index 342785a..2f29370 100644 --- a/src/nmail.1 +++ b/src/nmail.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man. -.TH NMAIL "1" "September 2026" "nmail 5.16.3" "User Commands" +.TH NMAIL "1" "September 2026" "nmail 5.16.4" "User Commands" .SH NAME nmail \- ncurses mail .SH SYNOPSIS diff --git a/src/version.cpp b/src/version.cpp index 0342a77..955da9a 100644 --- a/src/version.cpp +++ b/src/version.cpp @@ -9,7 +9,7 @@ #include "buildinfo.h" -#define NMAIL_VERSION "5.16.3" +#define NMAIL_VERSION "5.16.4" std::string Version::GetBuildOs() {