linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: Diego Calleja <diegocg@gmail.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org, matthltc@us.ibm.com
Subject: Re: Linux 2.6.15-rc6
Date: Mon, 19 Dec 2005 06:41:24 +0100	[thread overview]
Message-ID: <20051219054124.GL15993@alpha.home.local> (raw)
In-Reply-To: <20051219023058.6d94b13d.diegocg@gmail.com>

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 <torvalds@osdl.org> 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


  reply	other threads:[~2005-12-19  5:41 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-19  0:47 Linux 2.6.15-rc6 Linus Torvalds
2005-12-19  1:30 ` Diego Calleja
2005-12-19  5:41   ` Willy Tarreau [this message]
2005-12-20 13:18 ` 2.6.15-rc6: boot failure in saa7134-alsa.c Adrian Bunk
2005-12-20 15:52   ` [Alsa-devel] " Sergey Vlasov
2005-12-20 18:24     ` Linus Torvalds
     [not found]       ` <20051220183455.GC19797@master.mivlgu.local>
2005-12-20 18:57         ` Linus Torvalds
2005-12-20 19:14       ` Adrian Bunk
2005-12-20 19:23         ` Mauro Carvalho Chehab
2005-12-20 19:59         ` Linus Torvalds
2005-12-20 20:23           ` Adrian Bunk
2005-12-20 20:41             ` Linus Torvalds
2005-12-20 20:47               ` James Courtier-Dutton
2005-12-20 21:06                 ` Linus Torvalds
2005-12-20 21:13                 ` [RFC: 2.6 patch] Makefile: sound/ must come before drivers/ Adrian Bunk
2005-12-20 21:24                   ` [Alsa-devel] " Jaroslav Kysela
2005-12-20 22:09                   ` Linus Torvalds
2005-12-21 14:21                     ` Takashi Iwai
2005-12-21 20:49                       ` Mauro Carvalho Chehab
2005-12-22 15:32                         ` Takashi Iwai
2005-12-22 16:06                           ` Mauro Carvalho Chehab
2005-12-22 16:17                             ` Takashi Iwai
2005-12-22 16:38                               ` Mauro Carvalho Chehab
2005-12-21 14:23             ` [Alsa-devel] 2.6.15-rc6: boot failure in saa7134-alsa.c Takashi Iwai
2005-12-21 18:22               ` Adrian Bunk
2005-12-21 18:38                 ` Takashi Iwai
2005-12-21 22:40                   ` Adrian Bunk
2005-12-22 11:39                     ` Takashi Iwai
2005-12-20 20:35           ` James Courtier-Dutton
2005-12-20 21:03             ` Linus Torvalds
2005-12-20 22:17               ` Lee Revell
2005-12-21  1:29                 ` Linus Torvalds
2005-12-21 13:29                 ` Stephen Clark
2005-12-21 14:39               ` Takashi Iwai
2005-12-21 18:32                 ` Linus Torvalds
2005-12-21 18:52                   ` Takashi Iwai
2005-12-21 22:42                     ` Adrian Bunk
2005-12-21 22:50                     ` R C
2005-12-21 16:58               ` Steve deRosier
2005-12-21 18:32                 ` Linus Torvalds
2005-12-21 18:41                   ` Takashi Iwai
2005-12-20 20:35         ` Mauro Carvalho Chehab
2005-12-22  0:59           ` Adrian Bunk
2005-12-22 11:15             ` Mauro Carvalho Chehab
2005-12-22  1:13 ` 2.6.15-rc6: known regressions in the kernel Bugzilla Adrian Bunk
2005-12-22  7:15   ` Greg KH
2005-12-22 12:04     ` Takashi Iwai
2005-12-29 13:23       ` Adrian Bunk
2005-12-30 19:31         ` Lee Revell
2005-12-22  8:52   ` Andrew Morton
2005-12-22 13:57     ` Adrian Bunk
2005-12-22 14:08       ` Andrew Morton
2005-12-22 23:12         ` Adrian Bunk
2005-12-23 15:28         ` Bill Davidsen
2005-12-23 17:32           ` Michael Krufky
2005-12-24  3:54             ` Andrew Morton
2005-12-25 20:25               ` Bill Davidsen
2005-12-26  1:59               ` Michael Krufky
2005-12-26  2:21               ` Lee Revell
2005-12-22 17:11       ` Brice Goglin
     [not found]       ` <200512222152.05427.p_christ@hol.gr>
     [not found]         ` <1135291436.14685.7.camel@localhost>
2005-12-22 22:55           ` Mike Krufky
     [not found]             ` <200512230121.48882.p_christ@hol.gr>
2005-12-23  1:07               ` Michael Krufky
2005-12-23 11:50       ` Gottfried Haider
2006-01-02 16:00         ` Adrian Bunk
2006-01-04 16:38           ` Greg KH
2005-12-22 15:16     ` David S. Miller
2005-12-19  8:50 Linux 2.6.15-rc6 Voluspa
2005-12-21  4:21 Voluspa
2005-12-21  5:33 ` Linus Torvalds
2005-12-21  5:45   ` Voluspa
2005-12-21 13:51   ` Voluspa

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=20051219054124.GL15993@alpha.home.local \
    --to=willy@w.ods.org \
    --cc=diegocg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthltc@us.ibm.com \
    --cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).