This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Lack of system_utsname in recent kernels may prevent some systemtap programs from compiling
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Marcin Krol <admin at domeny dot pl>
- Cc: systemtap at sourceware dot org
- Date: Mon, 03 Dec 2007 16:43:01 -0500
- Subject: Re: Lack of system_utsname in recent kernels may prevent some systemtap programs from compiling
- References: <4751389E.4060207@domeny.pl> <47513D2D.80304@domeny.pl>
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