It's not as easy as I thought. Not all redhat kernels are equal.
Some of them has an extra argument to kill_fasync(). It seems this
has been added since 2.2.14 but I don't have all redhat kernels to
check. Can somebody comfirm this and tell why this change is necessary?
I can then check LINUX_VERSION_CODE
Frank
On Wed, 23 Aug 2000, Frank Liu wrote:
>
> This is not runtime, it is compile time.
> (even if it is runtime, how can uname() tell if you are running
> a kernel provided by redhat or downloaded from kernel.org?).
>
> Anyway, the program calls function
> kill_fasync()
> under Redhat's kernel, it requires three arguments
> (see /usr/src/linux/include/linux/fs.h)
> under normal kernel, it requires two arguments.
>
> any hints what to do in the code so that it can compile under both
> kernels?
>
> thanks!
> frank
>
> On Wed, 23 Aug 2000, Matt Wilson wrote:
>
> > I'd be interested to know what you're coding that would behave
> > differently depending on the running kernel.
> >
> > You shouldn't #ifdef this, you should use runtime checks using the
> > uname() function.
> >
> > Matt
> >
> > On Wed, Aug 23, 2000 at 02:35:23PM -0500, Frank Liu wrote:
> > >
> > > Since redhat kernel is a bit different from the stock kernel source.
> > > In my C source code, I need to do things differently depending on
> > > what kernel the user has. How can I #ifdef test that?
> > > Thanks!
> > > Frank
> >
> >
> >
> > _______________________________________________
> > Redhat-devel-list mailing list
> > [EMAIL PROTECTED]
> > https://listman.redhat.com/mailman/listinfo/redhat-devel-list
> >
>
>
_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list