* Build failure - missing linux/limits.h include?
@ 2003-11-24 23:12 Chris Larson
2003-11-25 0:18 ` Arnd Bergmann
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chris Larson @ 2003-11-24 23:12 UTC (permalink / raw)
To: linux-hotplug
Greetings,
udev fails to compile here unless I'm doing a KLIBC build. The reason
appears to be that the normal limits.h in the gcc inc dir doesn't pull
in linux/limits.h, whereas the limits.h out in the klibc include dirs
does. I'd think it'd be best to add a #include <linux/limits.h> to
udev.h directly, since it uses PATH_MAX.
--
Chris Larson - kergoth at handhelds dot org
Embedded Linux Developer - clarson at ti dot com
OpenZaurus Project Maintainer - http://openzaurus.org/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Build failure - missing linux/limits.h include?
2003-11-24 23:12 Build failure - missing linux/limits.h include? Chris Larson
@ 2003-11-25 0:18 ` Arnd Bergmann
2003-11-25 0:29 ` Chris Larson
2003-12-02 0:30 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2003-11-25 0:18 UTC (permalink / raw)
To: linux-hotplug
On Tuesday 25 November 2003 00:12, Chris Larson wrote:
> udev fails to compile here unless I'm doing a KLIBC build. The reason
> appears to be that the normal limits.h in the gcc inc dir doesn't pull
> in linux/limits.h, whereas the limits.h out in the klibc include dirs
> does. I'd think it'd be best to add a #include <linux/limits.h> to
> udev.h directly, since it uses PATH_MAX.
No, don't include kernel headers directly if you can avoid it.
The problem you are referring to seems to be with old tool chains,
I have the same symptom with my s390 gcc-2.95/glibc-2.1.3.
Including <sys/param.h> instead of <limits.h> seems to fix it.
Arnd <><
=== udev.h 1.20 vs edited ==--- 1.20/udev.h Sun Nov 23 23:25:13 2003
+++ edited/udev.h Tue Nov 25 01:17:06 2003
@@ -24,7 +24,7 @@
#define UDEV_H
#include "libsysfs/libsysfs.h"
-#include <limits.h>
+#include <sys/param.h>
#ifdef DEBUG
#include <syslog.h>
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Build failure - missing linux/limits.h include?
2003-11-24 23:12 Build failure - missing linux/limits.h include? Chris Larson
2003-11-25 0:18 ` Arnd Bergmann
@ 2003-11-25 0:29 ` Chris Larson
2003-12-02 0:30 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Chris Larson @ 2003-11-25 0:29 UTC (permalink / raw)
To: linux-hotplug
* Arnd Bergmann (arnd@arndb.de) wrote:
> On Tuesday 25 November 2003 00:12, Chris Larson wrote:
> > udev fails to compile here unless I'm doing a KLIBC build. The reason
> > appears to be that the normal limits.h in the gcc inc dir doesn't pull
> > in linux/limits.h, whereas the limits.h out in the klibc include dirs
> > does. I'd think it'd be best to add a #include <linux/limits.h> to
> > udev.h directly, since it uses PATH_MAX.
>
> No, don't include kernel headers directly if you can avoid it.
> The problem you are referring to seems to be with old tool chains,
> I have the same symptom with my s390 gcc-2.95/glibc-2.1.3.
> Including <sys/param.h> instead of <limits.h> seems to fix it.
Ah, that's better. Thanks :)
--
Chris Larson - kergoth at handhelds dot org
Embedded Linux Developer - clarson at ti dot com
OpenZaurus Project Maintainer - http://openzaurus.org/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Build failure - missing linux/limits.h include?
2003-11-24 23:12 Build failure - missing linux/limits.h include? Chris Larson
2003-11-25 0:18 ` Arnd Bergmann
2003-11-25 0:29 ` Chris Larson
@ 2003-12-02 0:30 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2003-12-02 0:30 UTC (permalink / raw)
To: linux-hotplug
On Tue, Nov 25, 2003 at 01:18:07AM +0100, Arnd Bergmann wrote:
> On Tuesday 25 November 2003 00:12, Chris Larson wrote:
> > udev fails to compile here unless I'm doing a KLIBC build. The reason
> > appears to be that the normal limits.h in the gcc inc dir doesn't pull
> > in linux/limits.h, whereas the limits.h out in the klibc include dirs
> > does. I'd think it'd be best to add a #include <linux/limits.h> to
> > udev.h directly, since it uses PATH_MAX.
>
> No, don't include kernel headers directly if you can avoid it.
> The problem you are referring to seems to be with old tool chains,
> I have the same symptom with my s390 gcc-2.95/glibc-2.1.3.
> Including <sys/param.h> instead of <limits.h> seems to fix it.
Applied, thanks.
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-12-02 0:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-24 23:12 Build failure - missing linux/limits.h include? Chris Larson
2003-11-25 0:18 ` Arnd Bergmann
2003-11-25 0:29 ` Chris Larson
2003-12-02 0:30 ` Greg KH
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).