1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 05:18:14 +02:00
openwrt/tools/gnulib
Michael Pratt 37f20d8c34 tools/gnulib: unmangle fts header on macOS
The gnulib fts header is meant to not be overwritten
in any way by the host system's copy of fts.h
and was therefore given a unique name instead.

This is fine if the built libgnu library is directly linked
with the target library, but if we want to keep them isolated
we end up having the definitions being mangled anyway
when the next object to link against included the fts.h header.

On some macOS platforms, the use of __DARWIN_INODE64
is messing with the link name for fts functions, resulting in:

Undefined symbols for architecture x86_64:
  "_rpl_fts_close$INODE64", referenced from:
...

Create a local fts header for gnulib
that completely blocks the macOS host fts header.

An alternative and more upstream friendly fix would be
to rename fts_.h to fts.h and add the macOS-only
include guard to that file within it's own include guard,
but that would be a massive patch, so do this for now.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-31 16:01:43 +02:00
..
patches tools/gnulib: unmangle fts header on macOS 2024-05-31 16:01:43 +02:00
Makefile tools/gnulib: update to branch stable-202401 2024-04-25 21:33:51 +02:00