Add Include sys/syscall.h for NDK build
Without this, prototype of syscall is not defined and it may occurs error.
Add preprocessor definition __EXPORTED_HEADERS__ for NDK build
Without this kernel header may occur warning and it's treated as error while compilation.
Unnecessary local variable errno is removed.
To build for Android with NDK 'kernel_may_have_perf_events_support' should be 'yes'
Other wise 'operf' is not built because LINUX_VERSION_CODE of NDK is less than 2.6.31
'linux/version.h' file is missed on android linux kernel.
Check /proc/pid/exe also to match with filename in mapping
Detailed in -> https://github.com/ChangbinPark/Oprofile/issues/1