summaryrefslogtreecommitdiff
path: root/include/strings.h
diff options
context:
space:
mode:
authorDaniel Kolesa2022-10-26 00:30:00 +0200
committerjvoisin2025-10-31 22:16:21 +0100
commitf46714c2f9eb13c12c8218f1b7c045182041fdc9 (patch)
treeb1285c57cd600790ce86890927504e59f1cbd7d7 /include/strings.h
parent8915dc13de44fed3a076a9fd51eb1ab2b5502d7b (diff)
add initial clang support
Co-Authored-By: jvoisin <julien.voisin@dustri.org>
Diffstat (limited to 'include/strings.h')
-rw-r--r--include/strings.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/strings.h b/include/strings.h
index 7645848..862b7be 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2015-2016 Dimitris Papastamos <sin@2f30.org> 2 * Copyright (C) 2015-2016 Dimitris Papastamos <sin@2f30.org>
3 * Copyright (C) 2022 q66 <q66@chimera-linux.org>
3 * 4 *
4 * Permission to use, copy, modify, and/or distribute this software for any 5 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted. 6 * purpose with or without fee is hereby granted.
@@ -30,7 +31,8 @@ extern "C" {
30 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) 31 || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
31#undef bcopy 32#undef bcopy
32#undef bzero 33#undef bzero
33_FORTIFY_FN(bcopy) void bcopy(const void *__s, void *__d, size_t __n) 34_FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s,
35 void * _FORTIFY_POS0 __d, size_t __n)
34{ 36{
35 size_t __bd = __bos(__d, 0); 37 size_t __bd = __bos(__d, 0);
36 size_t __bs = __bos(__s, 0); 38 size_t __bs = __bos(__s, 0);
@@ -40,7 +42,7 @@ _FORTIFY_FN(bcopy) void bcopy(const void *__s, void *__d, size_t __n)
40 return __orig_bcopy(__s, __d, __n); 42 return __orig_bcopy(__s, __d, __n);
41} 43}
42 44
43_FORTIFY_FN(bzero) void bzero(void *__s, size_t __n) 45_FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n)
44{ 46{
45 size_t __b = __bos(__s, 0); 47 size_t __b = __bos(__s, 0);
46 48