Lack of system_utsname in recent kernels may prevent some systemtap programs from compiling
Frank Ch. Eigler
fche@redhat.com
Mon Dec 3 21:44:00 GMT 2007
Marcin Krol <admin@domeny.pl> writes:
> I just realized I should rather correct this example from tutorial,
> since linux/utsname.h has changed.
Right. This is a relatively routine "version drift" where kernel
changes break some existing systemtap script code. We adapt and move
on. In this case, a script intended to remain portable would need
something like
function utsname .... %{
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2.6.23)
#define the_uts new_utsname
#else
#define the_uts init_new_whatever_utsname
#endif
...
THIS->__retvalue = the_uts.field;
...
%}
> However, I still don't get why I can't compile this updated example,
> since /usr/include/linux/utsname.h does include relevant structures:
/usr/include/linux/utsname.h is a user-side header, so its contents
are unused.
- FChE
More information about the Systemtap
mailing list