summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorXiaofan Chen <xiaofanc@gmail.com>2013-02-24 05:50:00 +0000
committerPete Batard <pete@akeo.ie>2013-02-24 23:03:32 +0000
commitc56f89068452f6ff144cd72ad234540049c06433 (patch)
tree1de280acd39234920974f6995e899a435ccbee90 /tests
parente35c17b1d412b66a89138af7b403a09f9778a987 (diff)
downloadlibusb-c56f89068452f6ff144cd72ad234540049c06433.tar.gz
Tests: Fix broken OS-X and Linux builds
* _dup2 is Windows only. Use dup2 instead * Breakage was introduced in 76eecc6ce11d1bedee369859899901037dcd4cc2
Diffstat (limited to 'tests')
-rw-r--r--tests/testlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/testlib.c b/tests/testlib.c
index 45bc5d4..77395cb 100644
--- a/tests/testlib.c
+++ b/tests/testlib.c
@@ -81,11 +81,11 @@ static void cleanup_test_output(libusbx_testlib_ctx * ctx)
#ifndef DISABLE_STDOUT_REDIRECTION
if (!ctx->verbose) {
if (ctx->old_stdout != INVALID_FD) {
- _dup2(ctx->old_stdout, STDOUT_FILENO);
+ dup2(ctx->old_stdout, STDOUT_FILENO);
ctx->old_stdout = INVALID_FD;
}
if (ctx->old_stderr != INVALID_FD) {
- _dup2(ctx->old_stderr, STDERR_FILENO);
+ dup2(ctx->old_stderr, STDERR_FILENO);
ctx->old_stderr = INVALID_FD;
}
if (ctx->null_fd != INVALID_FD) {