static int real_dup2(int fd, int fd2) { static int (*r_dup2)(int fd, int fd2) = NULL; if (!r_dup2) { if ((r_dup2 = dlsym(libc_handle, "dup2")) == NULL) { __set_errno(ENOSYS); return -1; } } return r_dup2(fd, fd2); }
void _fl_dup2 (int *w) { r_dup2 ((int)(w[0]), (int)(w[1]), (int *)(w[2])); }