diff options
author | Xiaofan Chen <xiaofanc@gmail.com> | 2013-02-24 05:50:00 +0000 |
---|---|---|
committer | Pete Batard <pete@akeo.ie> | 2013-02-24 23:03:32 +0000 |
commit | c56f89068452f6ff144cd72ad234540049c06433 (patch) | |
tree | 1de280acd39234920974f6995e899a435ccbee90 | |
parent | e35c17b1d412b66a89138af7b403a09f9778a987 (diff) | |
download | libusb-c56f89068452f6ff144cd72ad234540049c06433.tar.gz |
Tests: Fix broken OS-X and Linux builds
* _dup2 is Windows only. Use dup2 instead
* Breakage was introduced in 76eecc6ce11d1bedee369859899901037dcd4cc2
-rw-r--r-- | libusb/version_nano.h | 2 | ||||
-rw-r--r-- | tests/testlib.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h index fbd337f..72343ba 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 10619 +#define LIBUSB_NANO 10620 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) { |