openbsd-ports/graphics/zxing/patches/patch-cli_src_main_cpp
2022-03-07 21:36:41 +00:00

23 lines
618 B
Plaintext

Index: cli/src/main.cpp
--- cli/src/main.cpp.orig
+++ cli/src/main.cpp
@@ -18,6 +18,7 @@
#include <iostream>
#include <fstream>
#include <string>
+#include <unistd.h>
#include "ImageReaderSource.h"
#include <zxing/common/Counted.h>
#include <zxing/Binarizer.h>
@@ -180,6 +181,10 @@ string read_expected(string imagefilename) {
}
int main(int argc, char** argv) {
+ if (pledge("stdio rpath", NULL) == -1) {
+ cerr << "pledge" << endl;
+ return 1;
+ }
if (argc <= 1) {
cout << "Usage: " << argv[0] << " [OPTION]... <IMAGE>..." << endl
<< "Read barcodes from each IMAGE file." << endl