summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-10-03 22:30:46 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-10-03 22:30:46 (GMT)
commit82f647534c309ff97e4827fb95949954aeed4a26 (patch)
tree6258917ded5ace02e773ca318e6255a509cb7d24 /test
parent09bb031cf19e656ef8646a1448af5206b1b1cc29 (diff)
downloadhdf5-82f647534c309ff97e4827fb95949954aeed4a26.zip
hdf5-82f647534c309ff97e4827fb95949954aeed4a26.tar.gz
hdf5-82f647534c309ff97e4827fb95949954aeed4a26.tar.bz2
Make some NetBSD compatibility patches.
Diffstat (limited to 'test')
-rw-r--r--test/accum.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/accum.c b/test/accum.c
index 91786a9..d453121 100644
--- a/test/accum.c
+++ b/test/accum.c
@@ -1825,7 +1825,6 @@ test_swmr_write_big(hbool_t newest_format)
pid_t pid; /* Process ID */
#endif /* H5_HAVE_UNISTD_H */
int status; /* Status returned from child process */
- char *new_argv[] = {NULL};
char *driver = NULL; /* VFD string (from env variable) */
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
@@ -1954,6 +1953,13 @@ test_swmr_write_big(hbool_t newest_format)
FAIL_STACK_ERROR;
}
else if(0 == pid) { /* Child process */
+ /* By convention, argv[0] tells the name of program invoked.
+ *
+ * execv on NetBSD 8 will actually return EFAULT if there is a
+ * NULL at argv[0], so we follow the convention unconditionally.
+ */
+ char swmr_reader[] = SWMR_READER;
+ char * const new_argv[] = {swmr_reader, NULL};
/* Run the reader */
status = HDexecv(SWMR_READER, new_argv);
HDprintf("errno from execv = %s\n", strerror(errno));