summaryrefslogtreecommitdiff
path: root/built_in.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-05-12 18:13:31 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-05-12 18:13:31 +0200
commitf232545c215022de5be5e0b37e0c7130962cc5d0 (patch)
treee4756d11b0402cb8153bc90f48fe2e1e49839031 /built_in.h
parentb25a51fa5915df87f31a0cc0459cd9f05e17f540 (diff)
built_in: don't redefine memcpy/memset
Redefining memset/memcpy causes problems when building with fortified headers on Alpine Linux. Instead of uncoditionally defining these, explicitely use fmemcpy/fmemset in performance critical paths and otherwise let the compiler decide about optimizations. Fixes #173 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'built_in.h')
-rw-r--r--built_in.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/built_in.h b/built_in.h
index bb24746..da04dbd 100644
--- a/built_in.h
+++ b/built_in.h
@@ -322,12 +322,6 @@ static inline u64 cpu_to_le64(u64 val)
#define be32_to_cpu cpu_to_be32
#define be16_to_cpu cpu_to_be16
-#undef memset
-#undef memcpy
-
-#define memset fmemset
-#define memcpy fmemcpy
-
#if defined(__amd64__) || defined(__x86_64__) || defined(__AMD64__) || \
defined(_M_X64) || defined(__amd64)
# define CO_IN_CACHE_SHIFT 7