mirror of https://github.com/openbsd/ports.git
link to upstream merged PR for pledge, drop test bits
This commit is contained in:
parent
df4353cf31
commit
8c8d324198
|
@ -1,4 +1,5 @@
|
|||
Use pledge(2), xxhsum(1) only ever reads files or stdin.
|
||||
merged https://github.com/Cyan4973/xxHash/pull/880
|
||||
|
||||
Index: cli/xsum_os_specific.c
|
||||
--- cli/xsum_os_specific.c.orig
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
Use pledge(2), the sanity test does even not read files.
|
||||
|
||||
Index: tests/sanity_test.c
|
||||
--- tests/sanity_test.c.orig
|
||||
+++ tests/sanity_test.c
|
||||
@@ -639,6 +639,13 @@ int main(int argc, const char* argv[])
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+ if (pledge("stdio", NULL) == -1) {
|
||||
+ XSUM_log("pledge: %s\n", strerror(errno));
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
{
|
||||
/* XXH32 */
|
||||
size_t const n = sizeof(XSUM_XXH32_testdata) / sizeof(XSUM_XXH32_testdata[0]);
|
Loading…
Reference in New Issue