[Buildroot] [PATCH 1/1] package/bash: indicate getcwd is malloc-supported
Peter Korsgaard
peter at korsgaard.com
Fri Sep 4 14:45:57 UTC 2015
>>>>> "James" == James Knight <james.knight at rockwellcollins.com> writes:
> When Bash attempts to find the current working directory, it uses a C
> library call `getcwd` to resolve it. When cross-compiling, the
> configuration process cannot determine if the target system's C library
> can support an "unfixed" path length. Therefore, Bash will fallback to a
> size of `PATH_MAX` for determining the current working directory. When
> using OverlayFS (and possible other file systems), this becomes an issue
> since file paths can commonly exceed standard `PATH_MAX` length. This
> typically results in the following error appearing:
> error retrieving current directory: [...]
> Common C library `getcwd` calls can default to a higher limit (usually
> the system's page size). The current configurable C libraries (as of at
> least 2015.08) support a zero (0) size buffer length. Most use the
> system's page size; musl, being an exception, which defaults to
> `PATH_MAX` (as Bash was doing). Since these C libraries support
> allocating buffer space with a zero (0) provided size, the following
> configuration change allows Bash to support getting a larger-length'ed
> working directory on target's that support it.
> Signed-off-by: James Knight <james.knight at rockwellcollins.com>
Committed, thanks.
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list