]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
add include guards
authorYann Collet <cyan@fb.com>
Sun, 27 Aug 2023 23:12:06 +0000 (16:12 -0700)
committerYann Collet <cyan@fb.com>
Tue, 12 Sep 2023 20:46:03 +0000 (13:46 -0700)
alleviate risks of double inclusion (typically via transitive includes)

lib/libzstd.mk

index 2c47ecdfa060bf8eb184cd36995cbbf330677b1e..ce6e1137519d4329d4c2159fcf66b046d31c11de 100644 (file)
@@ -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