wayland-egl: Update wayland-egl-symbols-check for darwin

darwin prefixes C symbols with an underscore character

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2023-01-27 19:54:02 -08:00
parent 9a04e23719
commit 2a7bce324b

View file

@ -14,7 +14,12 @@ if ! test -n "$NM"; then
exit 99
fi
AVAIL_FUNCS="$($NM -D --format=bsd --defined-only $LIB | awk '{print $3}')"
# Assuming any system with SystemVersion.plist is a darwin-derivative and prefixes C symbols with _
if [ -f "/System/Library/CoreServices/SystemVersion.plist" ] ; then
AVAIL_FUNCS="$($NM $LIB | awk '{print $3}' | sed 's:^_::')"
else
AVAIL_FUNCS="$($NM -D --format=bsd --defined-only $LIB | awk '{print $3}')"
fi
# Official ABI, taken from the header.
REQ_FUNCS="wl_egl_window_resize