i trying use -wl,-wrap=sendto -wl,-wrap,sendto in final g++ link command links app replace standard sendto function own. i compile following source code gcc -c -o wrap.o wrap.c , include wrap.o in final g++ command links app (the rest of app c++ hence use of g++) #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> ssize_t __real_sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t); ssize_t __wrap_sendto ( int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen ) { printf("my wrap sendto ...\n"); return __real_sendto(sockfd, buf, len, flags, dest_addr, addrlen); } when use sendto in own source code, wrapper in fact used ok 3rd party shared objects linked against in final g++ command use sendto still use system sendto i.e. not wrapper. how can sendto wrapper used throughout ? i have tried ld_preload approach sendto , dlsym(rtld_nex...
i searched on internet provided answers did not in building project. the error starting fork. tried following methods: mvn clean install -u when searched, people said because of java 7 , should work java 6. using java 6 only. some said set surefire plugin this: <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.5</version> <configuration> <skiptests>false</skiptests> <testfailureignore>true</testfailureignore> <forkmode>once</forkmode> </configuration> the actual error is: [error] failed execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project junitcategorizer.instrument: error occurred in starting fork, check output in log -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.apache.maven.plugins:maven-surefire-plugin:2...
Comments
Post a Comment