File: libcpath-Add-PATH_MAX-for-Hurd-compatibility.patch

package info (click to toggle)
libesedb 20240420-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,892 kB
  • sloc: ansic: 264,937; sh: 6,589; makefile: 1,785; cpp: 385; python: 363; sed: 16
file content (22 lines) | stat: -rw-r--r-- 697 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: "Aaron M. Ucko" <ucko@debian.org>
Date: Mon, 18 Dec 2017 21:37:00 +0100
Subject: libcpath: Add PATH_MAX for Hurd compatibility

---
 libcpath/libcpath_path.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libcpath/libcpath_path.c b/libcpath/libcpath_path.c
index eedda3c..7ea40e5 100644
--- a/libcpath/libcpath_path.c
+++ b/libcpath/libcpath_path.c
@@ -441,6 +441,9 @@ int libcpath_path_get_current_working_directory(
      libcerror_error_t **error )
 {
 	static char *function = "libcpath_path_get_current_working_directory";
+#if !defined(PATH_MAX)  &&  defined _PC_PATH_MAX
+	size_t PATH_MAX = pathconf(".", _PC_PATH_MAX);
+#endif
 
 	if( current_working_directory == NULL )
 	{