diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-06-05 12:22:40 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2016-06-05 12:24:11 (GMT) |
commit | 057a4228b31184fd227f6a2f14b12bb8c685fdea (patch) | |
tree | bcb685dcc5c7b6b03ac089e63df8cc74b5d84262 /src/hyperscan-1-fixes.patch | |
parent | 6fc5ea37141a7f8541b3bb4cb8cb2186416fba81 (diff) | |
download | mxe-057a4228b31184fd227f6a2f14b12bb8c685fdea.zip mxe-057a4228b31184fd227f6a2f14b12bb8c685fdea.tar.gz mxe-057a4228b31184fd227f6a2f14b12bb8c685fdea.tar.bz2 |
hyperscan: open file in binary mode
See also https://github.com/01org/hyperscan/pull/26
Diffstat (limited to 'src/hyperscan-1-fixes.patch')
-rw-r--r-- | src/hyperscan-1-fixes.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/hyperscan-1-fixes.patch b/src/hyperscan-1-fixes.patch index 658cb0a..e545176 100644 --- a/src/hyperscan-1-fixes.patch +++ b/src/hyperscan-1-fixes.patch @@ -6447,3 +6447,26 @@ index 1111111..2222222 100644 endif() if(MINGW OR NOT WIN32) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sat, 4 Jun 2016 00:00:24 +0200 +Subject: [PATCH] simplegrep: open file in binary mode + +Otherwise it hangs on binary files (MinGW). + +See https://github.com/01org/hyperscan/pull/26 + +diff --git a/examples/simplegrep.c b/examples/simplegrep.c +index 1111111..2222222 100644 +--- a/examples/simplegrep.c ++++ b/examples/simplegrep.c +@@ -77,7 +77,7 @@ static int eventHandler(unsigned int id, unsigned long long from, + * length with its length. Returns NULL on failure. + */ + static char *readInputData(const char *inputFN, unsigned int *length) { +- FILE *f = fopen(inputFN, "r"); ++ FILE *f = fopen(inputFN, "rb"); + if (!f) { + fprintf(stderr, "ERROR: unable to open file \"%s\": %s\n", inputFN, + strerror(errno)); |