Gbp-Pq: Name path_max.diff
#define PATH_MAX _MAX_PATH
#endif
+#if !defined(PATH_MAX) && defined(__GNU__)
+#define PATH_MAX (4096)
+#endif
+
#define MODULE_PREFIX "pipe_"
static int (*backends[])(struct pipe_loader_device **, int) = {
{
bool sub_dirs_created = false;
- char buf[PATH_MAX];
- if (getcwd(buf, PATH_MAX)) {
+ char *buf = getcwd(NULL, 0);
+ if (buf) {
char *full_path = ralloc_asprintf(mem_ctx, "%s%s", buf, ++cache_dir);
struct stat sb;
if (stat(full_path, &sb) != -1 && S_ISDIR(sb.st_mode))
#define PATH_MAX MAX_PATH
#endif
+#if !defined(PATH_MAX) && defined(__GNU__)
+#define PATH_MAX (4096)
+#endif
+
static bool error = false;
static void