[fuchsia] Add ifdefs to build standalone

In order to link zstd into userboot, we need to break some dependencies
on malloc and free, which do not exist in userboot. These functions are
not actually used, but the compiler is not smart enough to drop them.

This CL adds a #define to remove these symbols when building for use in
userboot.

Change-Id: I267156adda45da8e58a1ff62b4633df5fc943582
diff --git a/lib/common/fse_decompress.c b/lib/common/fse_decompress.c
index 4f07378..0e0b301 100644
--- a/lib/common/fse_decompress.c
+++ b/lib/common/fse_decompress.c
@@ -81,6 +81,7 @@
 
 
 /* Function templates */
+#if !defined(ZSTDLIB_STANDALONE)
 FSE_DTable* FSE_createDTable (unsigned tableLog)
 {
     if (tableLog > FSE_TABLELOG_ABSOLUTE_MAX) tableLog = FSE_TABLELOG_ABSOLUTE_MAX;
@@ -91,6 +92,7 @@
 {
     free(dt);
 }
+#endif /* !defined(ZSTDLIB_STANDALONE) */
 
 size_t FSE_buildDTable(FSE_DTable* dt, const short* normalizedCounter, unsigned maxSymbolValue, unsigned tableLog)
 {
diff --git a/lib/common/xxhash.c b/lib/common/xxhash.c
index 99d2459..049f0c2 100644
--- a/lib/common/xxhash.c
+++ b/lib/common/xxhash.c
@@ -100,8 +100,10 @@
 /* for malloc(), free() */
 #include <stdlib.h>
 #include <stddef.h>     /* size_t */
+#if !defined(ZSTDLIB_STANDALONE)
 static void* XXH_malloc(size_t s) { return malloc(s); }
 static void  XXH_free  (void* p)  { free(p); }
+#endif
 /* for memcpy() */
 #include <string.h>
 static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
@@ -548,6 +550,8 @@
 *  Advanced Hash Functions
 ****************************************************/
 
+#if !defined(ZSTDLIB_STANDALONE)
+
 XXH_PUBLIC_API XXH32_state_t* XXH32_createState(void)
 {
     return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t));
@@ -568,6 +572,8 @@
     return XXH_OK;
 }
 
+#endif /* !defined(ZSTDLIB_STANDALONE) */
+
 
 /*** Hash feed ***/