Hi! > The problem is that for arches that don't have SYS_getdents defined, > you will not be able to compile LTP on them so you really need to > hide this codepath from them. > > A similar commit that changes the codepath based on whether a > particular __NR_XX is defined is this > https://github.com/linux-test-project/ltp/commit/75201f160b9aa49af70d8f46fb1f087e63d603dd > > I don't see an easy way to determine if __NR_XX is defined or not > during runtime.
There is code that tries to address this issue in testcases/kernel/include/linux_syscall_numbers.h which defines macro ltp_syscall() that turns undefined syscall numbers into ENOSYS. The idea is to: 1) include sys/syscall.h to get the definitions system definitons 2) if your system headers are older (i.e. particular __NR_xxx is not defined) definitions from arch.in files are used 3) if __NR_xxx is not defined, there are stubs at the end of the header that defines the __NR_xxx to 0 which is then used by the ltp_syscall() macro to return -1 and set errno to ENOSYS -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
