Well, patch used in this formula before fails to apply directly https://github.com/erikd/libsndfile/commit/d04e1d.patch

So we need to either keep this one in gist or apply a bunch of other upstream patches (there was a lot of whitespace fixes). I stopped after applying https://github.com/erikd/libsndfile/commit/18c110.patch and https://github.com/erikd/libsndfile/commit/8508ec.patch and still having failed hunks.

However, after applying this first patch from gist and having three other patches applied directly from upstream commits build still fails for me with the same issue, "symbol(s) not found for architecture x86_64". Maybe offsets gone wrong somewhere while applying, maybe I messed it up somehow.

If this is required to get this merged and get #26133 fixed, I will try to take a closer look when I will have some free time. But from the point where I stopped trying, having applied 6 patches and still having two issues, maybe having two patches in gist is more clean way to fix that.