The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* Detecting Red Hat builds ?
@ 2001-05-10 16:25 rjd
  2001-05-11  2:28 ` Keith Owens
  0 siblings, 1 reply; 3+ messages in thread
From: rjd @ 2001-05-10 16:25 UTC (permalink / raw)
  To: linux-kernel

Hi,

How can I determine if the build my device driver is being compiled under is
a standard kernel.org one or a Red Hat one ?

The problem is I have a driver that includes syncppp.h which in the releases
from kernel.org is in linux/drivers/net/wan/ up to and including 2.4.2 after
which it moves to linux/include/net/. Can cope with this easily enough with
a "#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,2)" but unfortunatly the
kernel source supplied with Red Hat 7.1 reports itself as 2.4.2 but already
has the syncppp changes from 2.4.3.

I was shown a trick to solve a similar problem under 2.2.x but the symbol
defined as a side effect of including one of the standard system headers
is no longer present :-(


-- 
        Bob Dunlop                      FarSite Communications
        rjd@xyzzy.clara.co.uk           bob.dunlop@farsite.co.uk
        www.xyzzy.clara.co.uk           www.farsite.co.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread
* RE: Detecting Red Hat builds ?
@ 2001-05-10 18:28 Khachaturov, Vassilii
  0 siblings, 0 replies; 3+ messages in thread
From: Khachaturov, Vassilii @ 2001-05-10 18:28 UTC (permalink / raw)
  To: 'rjd@xyzzy.clara.co.uk'; +Cc: linux-kernel

For a RH7.x, at least, there is the /boot/kernel.h file generated on bootup,
and the RH kernel headers include it somewhere.
You can see if the corresponding symbols (coming from it) are defined, and
assume redhat than.
You might consider using passing -dM down to the preprocessor with the
standard driver includes preamble,
and look in the preprocessed output for a good clue - it may well be that
there is some other redhat-specific string somewhere defined.
I guess you will find smth if you egrep -i (rh|redhat).

HTH,
	Vassilii

-----Original Message-----
From: rjd@xyzzy.clara.co.uk [mailto:rjd@xyzzy.clara.co.uk]
Sent: Thursday, May 10, 2001 12:25 PM
To: linux-kernel@vger.kernel.org
Subject: Detecting Red Hat builds ?


Hi,

How can I determine if the build my device driver is being compiled under is
a standard kernel.org one or a Red Hat one ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-11  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-10 16:25 Detecting Red Hat builds ? rjd
2001-05-11  2:28 ` Keith Owens
  -- strict thread matches above, loose matches on Subject: below --
2001-05-10 18:28 Khachaturov, Vassilii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox