Skip to content

Commit 499a5e5

Browse files
committed
Fixed undeclared identifier to PATH_MAX on RHEL
On RHEL the macro `PATH_MAX` is in linux/limits.h, not limits.h. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 0a858a9 commit 499a5e5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

deps-packaging/git/cfbuild-git.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ case "$OS" in
3636
;;
3737
esac
3838

39+
# On RHEL the macro PATH_MAX is in linux/limits.h, not limits.h
40+
patch -p1 < %{_topdir}/SOURCES/fixed-undeclared-identifier-PATH_MAX.patch
41+
3942
make CURL_LDFLAGS="-lcurl"
4043

4144
%install
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
--- git-2.52.0/t/unit-tests/clar/clar.h 2025-11-17 17:38:17.000000000 +0100
2+
+++ git-2.52.0-modified/t/unit-tests/clar/clar.h 2025-11-24 15:10:35.362508135 +0100
3+
@@ -10,6 +10,10 @@
4+
#include <stdlib.h>
5+
#include <limits.h>
6+
7+
+#ifndef PATH_MAX
8+
+#define PATH_MAX 4096
9+
+#endif
10+
+
11+
#if defined(_WIN32) && defined(CLAR_WIN32_LONGPATHS)
12+
# define CLAR_MAX_PATH 4096
13+
#elif defined(_WIN32)

0 commit comments

Comments
 (0)