$OpenBSD: patch-src_feedhq_api_cpp,v 1.1 2017/02/05 21:58:16 abieber Exp $
--- src/feedhq_api.cpp.orig	Tue Oct 11 09:07:30 2016
+++ src/feedhq_api.cpp	Tue Oct 11 09:12:45 2016
@@ -1,7 +1,7 @@
 #include <vector>
 #include <cstring>
 #include <iostream>
-#include <wordexp.h>
+#include <glob.h>
 
 #include <feedhq_api.h>
 #include <config.h>
@@ -63,11 +63,13 @@ std::string feedhq_api::retrieve_auth() {
 
 	std::string pass = cfg->get_configvalue("feedhq-password");
 	if( pass == "" ) {
-		wordexp_t exp;
-		std::ifstream ifs;
-		wordexp(cfg->get_configvalue("feedhq-passwordfile").c_str(),&exp,0);
-		ifs.open(exp.we_wordv[0]);
-		wordfree(&exp);
+                glob_t exp;
+                std::ifstream ifs;
+                int res = glob(cfg->get_configvalue("feedhq-passwordfile").c_str(), GLOB_ERR, NULL, &exp);
+                if (!res && exp.gl_pathc == 1 && exp.gl_pathv) {
+                        ifs.open(exp.gl_pathv[0]);
+                }
+                globfree(&exp);
 		if (!ifs) {
 			if(!flushed) {
 				std::cout << std::endl;
