[PATCH] IPC: add PATH_MAX-less fallback definition for MAX_PATH
authorPino Toscano <toscano.pino@tiscali.it>
Sat, 22 Jun 2024 17:55:15 +0000 (19:55 +0200)
committerPino Toscano <pino@debian.org>
Fri, 5 Jul 2024 05:44:11 +0000 (07:44 +0200)
Define MAX_PATH also when PATH_MAX is not defined (e.g on GNU/Hurd).
MAX_PATH is Windows constant, and it is used in this file only in a
code path for Windows; because of this, the static fallback define
should be good enough.

Change-Id: Ic1b9fee3b62505f86aa8ec89bbd20493bfe1f67c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Gbp-Pq: Name upstream_IPC-add-PATH_MAX-less-fallback-definition-for-MAX_PA.patch

src/corelib/ipc/qsharedmemory.cpp

index 02761c0263f58b5e2d50094804511c19f0139185..6ee662dc539477c72cca3f6ef2e8672a667ae70f 100644 (file)
 #endif
 
 #ifndef MAX_PATH
-#  define MAX_PATH PATH_MAX
+#  ifdef PATH_MAX
+#    define MAX_PATH PATH_MAX
+#  else
+#    define MAX_PATH 1024
+#  endif
 #endif
 
 QT_BEGIN_NAMESPACE