Skip to content

Commit e57be0d

Browse files
authored
Merge pull request #4911 from pguyot/w18/fix-macos-sctk-strdup
Workaround for macOS bug with strdup (fixes #4855)
2 parents 02558cc + a74256f commit e57be0d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ sph2pipe_v$(SPH2PIPE_VERSION)/Makefile: sph2pipe-$(SPH2PIPE_VERSION).tar.gz
165165
rm -rf sph2pipe_v*
166166
tar -xmzf sph2pipe-$(SPH2PIPE_VERSION).tar.gz
167167
mv sph2pipe-$(SPH2PIPE_VERSION) sph2pipe_v$(SPH2PIPE_VERSION)
168+
# Workaround for macOS bug <rdar://problem/19363342>
169+
if [ `uname` = "Darwin" ]; then \
170+
sed -i -e "s/#define _XOPEN_SOURCE 500/#define _XOPEN_SOURCE 600/g" sph2pipe_v$(SPH2PIPE_VERSION)/sph2pipe.c ; \
171+
sed -i -e "s/#define _XOPEN_SOURCE 500/#define _XOPEN_SOURCE 600/g" sph2pipe_v$(SPH2PIPE_VERSION)/file_headers.c ; \
172+
fi
168173

169174
sph2pipe-$(SPH2PIPE_VERSION).tar.gz:
170175
if [ -d "$(DOWNLOAD_DIR)" ]; then \

0 commit comments

Comments
 (0)