This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Lack of system_utsname in recent kernels may prevent some systemtap programs from compiling


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]