diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2016-11-01 11:00:21 +0200 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2016-11-01 12:22:53 -0500 |
commit | c1c9487375f4dc80c5425a9ccfd407f3fa849ac3 (patch) | |
tree | 8cfa0db1e845ba40ff61a59888f3125012e8d5a7 /include | |
parent | 42bd70b29f5673ffead10c70cc4096c1410f4144 (diff) |
define PATH_MAX for HURD
PATH_MAX is not guaranteed to be defined. In parctice, all but the HURD
define it to a constant. It is indeed not safe to assume there won't be
longer paths and Asterisk generally does err safely on such cases.
So even for HURD we'll just pretend PATH_MAX is 4096.
ASTERISK-25070 #close
Change-Id: I53d10ba18c34c132bcb640a5fd8e0da1d9b22db3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/asterisk.h b/include/asterisk.h index c4cdfab9a..041f177e6 100644 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -36,6 +36,15 @@ #define AST_FILE_MODE 0666 #endif +/* Make sure PATH_MAX is defined on platforms (HURD) that don't define it. + * Also be sure to handle the case of a path larger than PATH_MAX + * (err safely) in the code. + */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + + #define DEFAULT_LANGUAGE "en" #define DEFAULT_SAMPLE_RATE 8000 |