[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linux/random.h bug
From: |
Akim Demaille |
Subject: |
Re: linux/random.h bug |
Date: |
Thu, 11 Sep 2003 09:08:53 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
> I just got this request from a configure I created with autoconf on a
> NetBSD system and then ran under Linux:
>> configure: WARNING: linux/random.h: present but cannot be compiled
>> configure: WARNING: linux/random.h: check for missing prerequisite headers?
>> configure: WARNING: linux/random.h: proceeding with the preprocessor's
>> result
>> configure: WARNING: ## ------------------------------------ ##
>> configure: WARNING: ## Report this to address@hidden ##
>> configure: WARNING: ## ------------------------------------ ##
> What is likely the problem is that the typedef __u32 is not defined
> because linux/random.h doesn't include all of the header files it
> relies upon. (The code fragment below suggests this.)
> Including <asm/types.h> before <linux/random.h> seems to work. I'm
> not sure this is the canonical solution, however.
> If you need more detailed information or need me to test something,
> please let me know.
> Peter
> ------------------------------------------------------------------------
> typedef unsigned int __u32;
> #include <linux/random.h>
> #include <stdio.h>
> main()
> {
> printf("Hello world!\n");
> }
Indeed, it seems that asm/types.h is the best bet. Thanks!
Index: ChangeLog
from Akim Demaille <address@hidden>
* doc/autoconf.texi (Header Portability): linux/random.h.
From Peter Hendrickson.
Index: THANKS
===================================================================
RCS file: /cvsroot/autoconf/autoconf/THANKS,v
retrieving revision 1.117
diff -u -u -r1.117 THANKS
--- THANKS 27 Aug 2003 07:30:23 -0000 1.117
+++ THANKS 11 Sep 2003 07:06:25 -0000
@@ -154,6 +154,7 @@
Paul Martinolich address@hidden
Pavel Roskin address@hidden
Peter Eisentraut address@hidden
+Peter Hendrickson address@hidden
Peter Simons address@hidden
Peter Stephenson address@hidden
Philipp Thomas address@hidden
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.757
diff -u -u -r1.757 autoconf.texi
--- doc/autoconf.texi 2 Sep 2003 19:13:59 -0000 1.757
+++ doc/autoconf.texi 11 Sep 2003 07:06:27 -0000
@@ -4321,6 +4321,10 @@
@hdrindex linux/irda.h
It requires @file{linux/types.h} and @file{sys/socket.h}.
address@hidden @file{linux/random.h}
address@hidden linux/random.h
+It requires @file{asm/types.h}.
+
@item @file{net/if.h}
@hdrindex net/if.h
On Darwin, this file requires that @file{sys/socket.h} be included
- Re: linux/random.h bug,
Akim Demaille <=