Skip to content

Commit

Permalink
[libcrystax] Fix F_DUPFD in fcntl (bug #1037)
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Moskalchuk <dm@crystax.net>
  • Loading branch information
dmsck committed Oct 13, 2015
1 parent f71a163 commit 270d0e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion sources/crystax/src/fcntl/fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ int fcntl(int fd, int command, ...)
rc = crystax_fcntl(fd, command, args);
va_end(args);
return rc;
case F_DUPFD:
case F_GETFD:
case F_GETFL:
case F_GETLEASE:
Expand All @@ -110,6 +109,7 @@ int fcntl(int fd, int command, ...)
case F_GETSIG:
return __fcntl64(fd, command);
case F_NOTIFY:
case F_DUPFD:
case F_SETFD:
case F_SETFL:
case F_SETLEASE:
Expand Down
7 changes: 0 additions & 7 deletions tests/device/crystax-test-fcntl/jni/fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ static void test_F_GETFD_and_F_SETFD(int fd)

static void test_F_DUPFD(int fd)
{
#if __ANDROID__ && __i386__
/* For some reason, this test fails on Android x86 devices.
* Temporarily disable it, until https://tracker.crystax.net/issues/1037 will be fixed.
*/
(void)fd;
#else
int rc = fcntl(fd, F_DUPFD, fd + 1);
assert(rc >= fd + 1);

Expand All @@ -52,7 +46,6 @@ static void test_F_DUPFD(int fd)
assert((fcntl(fd, F_GETFD) & FD_CLOEXEC) == 0);

close(rc);
#endif
}

static void test_F_DUPFD_CLOEXEC(int fd)
Expand Down

0 comments on commit 270d0e3

Please sign in to comment.