mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Brian McGrew <Brian@doubledimension.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Compiling a 2.4 driver under 2.6
Date: Thu, 30 Sep 2004 22:59:55 +0200	[thread overview]
Message-ID: <1096577995.2788.36.camel@laptop.fenrus.com> (raw)
In-Reply-To: <E6456D527ABC5B4DBD1119A9FB461E35019397@constellation.doubledimension.com>

[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]

On Thu, 2004-09-30 at 22:31, Brian McGrew wrote:

> ===[ Begin Error Output ]===
> 
> 119_ mk
> /usr/bin/gcc -D__SMP__

oh boy; __SMP__ doesn't exist for 2.4 let alone 2.6



>  -DMODVERSIONS -DEXPORT_SYMTAB 

this is very broken for 2.6


> -O1

any reason you're not using -O2

> -DCONFIG_MODVERSIONS 

WTF???

> /usr/include/linux/config.h:5:2: #error Incorrectly using glibc headers for a kernel module

you are using glibc headers for kernel modules. don't do this.


This makefile is quite broken; it needs converting to kbuild

> #ifndef __KERNEL__
> #define __KERNEL__
> #endif

this shouldn't be in modules

> 
> #ifndef MODULE
> #define MODULE
> #endif

this shouldn't be there either

> #if defined(CONFIG_MODVERSIONS) && !defined(MODVERSIONS)
> # define MODVERSIONS /* force it on */
> #endif

this is broken

> 
> #if defined(MODVERSIONS) && !defined(__GENKSYMS__)
> #include <linux/modversions.h>
> #include "ibb.ver"
> #endif

never include modversions.h directly
never ever include a .ver directly

> 
> #ifndef EXPORT_SYMTAB
> #  define EXPORT_SYMTAB /* need this one cause we export ibb_rtc_wakeup */
> #endif

dont do this

>  */
> #define TYPE(dev)   (MINOR(dev) >> 4)  /* high nibble */
> #define NUM(dev)    (MINOR(dev) & 0xf) /* low  nibble */

this doesn't work with 2.7

> 
> static void ibb_intr(int irq, void *dev_id, struct pt_regs *regs);

this is wrong for 2.6

I stop here because I don't want to get IP contaminated and I just had
something to eat that I don't want to see again ;)
but it's not looking good.


given that this is (really bad) proprietary code, I think you want to
contact the vendor of this code and get him to fix it up.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-09-30 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-30 20:31 Brian McGrew
2004-09-30 20:59 ` Arjan van de Ven [this message]
2004-09-30 21:08 ` Josh Boyer
2004-09-30 22:22 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1096577995.2788.36.camel@laptop.fenrus.com \
    --to=arjanv@redhat.com \
    --cc=Brian@doubledimension.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®