lkml.org 
[lkml]   [2003]   [Apr]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 5 Apr 2003 15:59:11 +0200 (MEST)
From mikpe@csd ...
Subject[PATCH][2.4.21-pre7] fix genksyms core dump in drivers/char/joystick
For a long time now, building a 2.4 kernel with MODVERSIONS=y
has left a core dump from genksyms in drivers/char/joystick/.
Last Tuesday, Adam Lackorzynski reported that this was due to a
#define in pci_gameport.h: When a config option is disabled, two
functions are #defined as stubs. This causes the pre-processed
C source code containing the non-stub versions of these functions
to have serious syntax errors, which in turn causes genksyms to
dump core.

This patch fixes this problem by using inline functions for the
stubs instead of #defines.

/Mikael

--- linux-2.4.21-pre7/include/linux/pci_gameport.h.~1~	2002-11-30 17:12:31.000000000 +0100
+++ linux-2.4.21-pre7/include/linux/pci_gameport.h	2003-04-05 14:31:20.000000000 +0200
@@ -32,8 +32,11 @@
 extern struct pcigame *pcigame_attach(struct pci_dev *dev, int type);
 extern void pcigame_detach(struct pcigame *game);
 #else
-#define pcigame_attach(a,b)	NULL
-#define pcigame_detach(a)
+static inline struct pcigame *pcigame_attach(struct pci_dev *dev, int type)
+{
+	return NULL;
+}
+static inline void pcigame_detach(struct pcigame *game) { }
 #endif
 
 #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:34    [from the cache]
©2003-2008