I need to wrap poll()
and this is what i am trying to use
and this is how i compileCode:#include <poll.h>
#include <unistd.h>
#include <sys/types.h>
int __wrap_poll(struct pollfd *fds, nfds_t nfds, int timeout) {
usleep(100);
return __real_poll(fds,nfds,timeout);
}
$gcc -fPIC -Wl,--wrap,poll -c poll.c
$ gcc -shared -Wl,--wrap,poll -o poll.so poll.o