$OpenBSD: patch-src_yasmet_cc,v 1.1 2021/11/15 04:23:36 bentley Exp $

Index: src/yasmet.cc
--- src/yasmet.cc.orig
+++ src/yasmet.cc
@@ -10,6 +10,7 @@
 #include <set>
 #include <iterator>
 #include <math.h>
+#include <unistd.h>
 
 /* YASMET 1.0 toolkit Copyright (C) 2002 Franz Josef Och */
 #include <fstream> /* This program is free software; you can redistribute */
@@ -77,6 +78,11 @@ struct event {
 
 int main(int argc, char **argv)
 {
+	if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+		std::cerr << "pledge" << endl;
+		exit(1);
+	}
+
 	std::string s;
 	std::vector<std::pair<event, double> > E;
 	bool lN = 0;
