Re: Linux 2.6.15-rc6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 19, 2005 at 02:30:58AM +0100, Diego Calleja wrote:
> El Sun, 18 Dec 2005 16:47:33 -0800 (PST),
> Linus Torvalds <[email protected]> escribió:
> 
> > Matt Helsley:
> >       Add getnstimestamp function
> >       Add timestamp field to process events
> 
> 
> This last change (5650b736ad328f7f3e4120e8790940289b8ac144) "broke" a
> small process event connector test program (the one matt posted here
> http://lkml.org/lkml/2005/9/28/347, slighty modified) due to a headers
> conflict. I think it's due to my setup, but...
> 
> --- a/include/linux/cn_proc.h
> +++ b/include/linux/cn_proc.h
> @@ -26,6 +26,7 @@
> #define CN_PROC_H
> #include <linux/types.h>
> +#include <linux/time.h>
> #include <linux/connector.h>
> 
> 
> 
> and the program:
> 31: #include <stdio.h>
> 32: #include <stdlib.h>
> 33: #include <string.h>
> 34: #include <unistd.h>
> 35: 
> 36: #include <sys/socket.h>
> 37: #include <sys/types.h>
> 38: 
> 39: #include <linux/connector.h>
> 40: #include <linux/netlink.h>
> 41: #include <linux/cn_proc.h>
> 
> 
> 
> This gives me 
> 
> diego@estel 2J2 ~/kernel # LC_ALL='C' make
> gcc -I 2.6/include test_cn_proc.c -o test_cn_proc
> In file included from 2.6/include/linux/cn_proc.h:29,
>                  from test_cn_proc.c:41:
> 2.6/include/linux/time.h:12: error: redefinition of 'struct timespec'
> 2.6/include/linux/time.h:18: error: redefinition of 'struct timeval'
> In file included from 2.6/include/linux/cn_proc.h:29,
>                  from test_cn_proc.c:41:
> 2.6/include/linux/time.h:121:1: warning: "FD_SET" redefined
> In file included from /usr/include/sys/types.h:216,
>                  from /usr/include/stdlib.h:433,
>                  from test_cn_proc.c:32:
> /usr/include/sys/select.h:93:1: warning: this is the location of the previous definitio
> 
> (My "debian testing" box supplies an old and apparently incompatible
> version of connector.h so I had to point gcc to kernel's headers directly)

As a dirty trick, you should be able to avoid this by adding the
following line just before #include <linux/cn_proc.h> :

   #define _LINUX_TIME_H

So that the preprocessor will think it has already included <linux/time.h>
definitions and will not load them again. Of course, if they are needed,
you're lost.

Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux