From: Arran Cudbard-Bell Date: Wed, 27 Oct 2021 19:19:29 +0000 (-0400) Subject: No flock on macOS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39af0ba3a30d71056c717c87d5b522af3bbb1a32;p=thirdparty%2Ffreeradius-server.git No flock on macOS --- diff --git a/src/bin/fuzzer.mk b/src/bin/fuzzer.mk index ad30eeb6a06..68e905666df 100644 --- a/src/bin/fuzzer.mk +++ b/src/bin/fuzzer.mk @@ -22,19 +22,20 @@ SOURCES := fuzzer.c TGT_PREREQS := libfreeradius-$(PROTOCOL).a -TGT_LDLIBS := $(LIBS) +TGT_LDLIBS := $(LIBS) # # Ensure that the large data file is copied from git-lfs, # and then the files are extracted. # # git-lfs fails to update the git index when multiple instances run -# concurrently. +# concurrently. Unfortunately there's no equivalent command on macOS. # .PHONY:src/tests/fuzzer-corpus/$(PROTOCOL) src/tests/fuzzer-corpus/$(PROTOCOL): ${Q}if [ ! -e $@ ]; then \ - flock -F /tmp/git-lfs-mutex git -c 'lfs.fetchexclude=' -c 'lfs.fetchinclude=src/tests/fuzzer-corpus/$(PROTOCOL).tar' lfs pull; \ + if which -s flock; then flock -F /tmp/git-lfs-mutex git -c 'lfs.fetchexclude=' -c 'lfs.fetchinclude=src/tests/fuzzer-corpus/$(PROTOCOL).tar' lfs pull; \ + else git -c 'lfs.fetchexclude=' -c 'lfs.fetchinclude=src/tests/fuzzer-corpus/$(PROTOCOL).tar' lfs pull; fi; \ cd src/tests/fuzzer-corpus; \ tar -xf $(PROTOCOL).tar; \ fi