summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-11-04 06:45:06 -0800
committerKonstantin Käfer <mail@kkaefer.com>2014-11-04 06:45:06 -0800
commit67eae5724a8e1caa36ca492ebe5f7e0d01b42ce1 (patch)
tree59263c3f1f4060bc79954a0274aa21b052369e38 /test
parent75889d812402ac2b75d891576a1c37cb43c8eaf3 (diff)
downloadqtlocation-mapboxgl-67eae5724a8e1caa36ca492ebe5f7e0d01b42ce1.tar.gz
use execv and pass non-inline argument for gcc
Diffstat (limited to 'test')
-rw-r--r--test/headless.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/headless.cpp b/test/headless.cpp
index 26aff177fc..361f3a9fc7 100644
--- a/test/headless.cpp
+++ b/test/headless.cpp
@@ -28,7 +28,8 @@ public:
if (pid < 0) {
throw std::runtime_error("Cannot create web server");
} else if (pid == 0) {
- int ret = execve((base_directory + "bin/server.py").c_str(), { nullptr }, { nullptr });
+ char *arg[] = { nullptr };
+ int ret = execv((base_directory + "bin/server.py").c_str(), arg);
// This call should not return. In case execve failed, we exit anyway.
if (ret < 0) {
fprintf(stderr, "Failed to start server: %s\n", strerror(errno));