I ran into this problem today regarding the LIRC source not building on
CentOS 4.3/4.4 or Rhel4 with recent kernels. I found that the recent
kernel has two new functions and macros (named class_create and
class_destroy) which conflict with the same lirc functions. I updated
code from todays CVS tree (2006/09/27) which seems to have fixed the
problem. Essentially I renamed the lirc functions to be prepended with
"lirc_" and updated any references. The cvs diff output is below:
Index: drivers/kcompat.h
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/kcompat.h,v
retrieving revision 5.27
diff -r5.27 kcompat.h
29c29
< static inline lirc_class_t *class_create(struct module *owner, char *name)
---
> static inline lirc_class_t *lirc_class_create(struct module *owner,
char *name)
34c34
< static inline void class_destroy(lirc_class_t *cls)
---
> static inline void lirc_class_destroy(lirc_class_t *cls)
129,130c129,130
< #define class_destroy(x) do { } while(0)
< #define class_create(x,y) NULL
---
> #define lirc_class_destroy(x) do { } while(0)
> #define lirc_class_create(x,y) NULL
Index: drivers/lirc_dev/lirc_dev.c
===================================================================
RCS file: /cvsroot/lirc/lirc/drivers/lirc_dev/lirc_dev.c,v
retrieving revision 1.48
diff -r1.48 lirc_dev.c
875c875
< lirc_class = class_create(THIS_MODULE, "lirc");
---
> lirc_class = lirc_class_create(THIS_MODULE, "lirc");
877c877
< printk(KERN_ERR "lirc_dev: class_create failed\n");
---
> printk(KERN_ERR "lirc_dev: lirc_class_create failed\n");
915c915
< class_destroy(lirc_class);
---
> lirc_class_destroy(lirc_class);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV