| 1 | Workaround for PATH_MAX usage on the Hurd.
|
| 2 |
|
| 3 | Taken from https://salsa.debian.org/debian/screen/-/blob/master/debian/patches/61-default-PATH_MAX-if-undefined-for-hurd.patch
|
| 4 |
|
| 5 | Description: Set PATH_MAX to 4096 if undefined
|
| 6 | Fixes FTBFS since 4.4.0 on GNU/Hurd. Updated to add one more occurrence for 4.5.0.
|
| 7 | Author: Axel Beckert <[email protected]>
|
| 8 | Bug: https://savannah.gnu.org/bugs/?50089
|
| 9 | Updated: 2017-01-18
|
| 10 | Updated: 2024-08-30 Update for Screen 5.0.0
|
| 11 | Updated: 2025-05-15 Update for building from git.
|
| 12 |
|
| 13 | diff --git a/src/screen.h b/src/screen.h
|
| 14 | index 308c365..e71bd7f 100644
|
| 15 | |
| 16 | |
| 17 | @@ -63,6 +63,22 @@ struct mode {
|
| 18 | #endif
|
| 19 | };
|
| 20 |
|
| 21 | +/*
|
| 22 | + * Define PATH_MAX to 4096 if it's not defined, like on GNU/Hurd
|
| 23 | + */
|
| 24 | +
|
| 25 | +#ifndef PATH_MAX
|
| 26 | +#define PATH_MAX 4096
|
| 27 | +#endif
|
| 28 | +
|
| 29 | +/*
|
| 30 | + * similarly for MAXPATHLEN
|
| 31 | + */
|
| 32 | +
|
| 33 | +#ifndef MAXPATHLEN
|
| 34 | +#define MAXPATHLEN PATH_MAX
|
| 35 | +#endif
|
| 36 | +
|
| 37 |
|
| 38 | #include "ansi.h"
|
| 39 | #include "image.h"
|