From: Yann Collet Date: Sun, 27 Aug 2023 23:12:06 +0000 (-0700) Subject: add include guards X-Git-Tag: v1.5.6^2~54^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b69d06a8102f0e04cde0bda2e34984099a0dfba4;p=thirdparty%2Fzstd.git add include guards alleviate risks of double inclusion (typically via transitive includes) --- diff --git a/lib/libzstd.mk b/lib/libzstd.mk index 2c47ecdfa..ce6e11375 100644 --- a/lib/libzstd.mk +++ b/lib/libzstd.mk @@ -8,6 +8,10 @@ # You may select, at your option, one of the above-listed licenses. # ################################################################ +# Ensure the file is not included twice +ifndef LIBZSTD_MK_INCLUDED +LIBZSTD_MK_INCLUDED := 1 + ################################################################## # Input Variables ################################################################## @@ -223,3 +227,5 @@ endif # BUILD_DIR ZSTD_SUBDIR := $(LIBZSTD)/common $(LIBZSTD)/compress $(LIBZSTD)/decompress $(LIBZSTD)/dictBuilder $(LIBZSTD)/legacy $(LIBZSTD)/deprecated vpath %.c $(ZSTD_SUBDIR) vpath %.S $(ZSTD_SUBDIR) + +endif # LIBZSTD_MK_INCLUDED