Skip to content

Commit

Permalink
braces
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Apr 10, 2024
1 parent 950691f commit c9dd18f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ $(shell mkdir -p $(BINDIR))
# TODO proper configure script / other build system?
ifeq (,$(wildcard $(BINDIR)/.have_strlcpy))
$(shell echo -e '#include <cstring>\nint main(){char a[4]{}; char b[4]{}; strlcpy(&a[0], &b[0], sizeof(a)); return 0;}' | \
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcpy 2>/dev/null || { echo -e '#!/bin/sh\nexit 1' > $(BINDIR)/.have_strlcpy ; chmod +x $(BINDIR)/.have_strlcpy; })
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcpy 2>/dev/null || ( echo -e '#!/bin/sh\nexit 1' > $(BINDIR)/.have_strlcpy ; chmod +x $(BINDIR)/.have_strlcpy; ))
endif

$(shell $(BINDIR)/.have_strlcpy)
Expand All @@ -82,7 +82,7 @@ endif

ifeq (,$(wildcard $(BINDIR)/.have_strlcat))
$(shell echo -e '#include <cstring>\nint main(){char a[4]{}; strlcat(&a[0], "test", sizeof(a)); return 0;}' | \
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcat 2>/dev/null || { echo -e '#!/bin/sh\nexit 1' > $(BINDIR)/.have_strlcat ; chmod +x $(BINDIR)/.have_strlcat; })
$(CXX) -x c++ - -o $(BINDIR)/.have_strlcat 2>/dev/null || ( echo -e '#!/bin/sh\nexit 1' > $(BINDIR)/.have_strlcat ; chmod +x $(BINDIR)/.have_strlcat; ))
endif

$(shell $(BINDIR)/.have_strlcat)
Expand Down

0 comments on commit c9dd18f

Please sign in to comment.