[asterisk-users] `PATH_MAX' undeclared here (not in a function) in asterisk!

James FitzGibbon james.fitzgibbon at gmail.com
Tue May 15 06:19:22 MST 2007


On 5/15/07, lizhong zhu <zhulizhongum at yahoo.com.cn> wrote:

> I compiled asterisk under arm-linux. i am using asterisk 1.4.2. i can run
> ./configure and menuselect with embedded modules. but running make comes out
> errors:
> ranlib libmxml.a
> [...[
>
/usr/src/asterisk-1.4.2/include/asterisk/paths.h:23: `PATH_MAX' undeclared
> here (not in a function)
> [...]



PATH_MAX on the Linux systems I have comes from /usr/include/linux/limits.h,
which gets pulled in by a few headers, sys/param.h being the most used one.

In my 1.4.4 source tree, this gets pulled in via autoconf, which has this
snippet in it's output file include/asterisk/autoconfig.h

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1

Check that you indeed have all your headers installed.  If PATH_MAX is in an
include file, but not one that gets pulled in by including sys/param.h, then
the configure script might need to be updated - best to open a bug and
attach your config.log as well as the basic info about your system.

I suspect that you're just missing the kernel-headers rpm (or equiv for your
Linux flavor).  That's where I get my linux/limits.h from:

[root at pbxlab-01 asterisk-1.4.4]# rpm -q --whatprovides
/usr/include/linux/limits.h
kernel-headers-2.6.18-8.1.3.el5
[root at pbxlab-01 asterisk-1.4.4]#

Many default installs do not include the kernel headers - you either have to
choose a "kernel development" package bundle at install time or install them
manually after the fact.

-- 
j.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070515/ccddebb7/attachment.htm


More information about the asterisk-users mailing list