aboutsummaryrefslogtreecommitdiff
path: root/libbb/const_hack.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/const_hack.c')
-rw-r--r--libbb/const_hack.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/const_hack.c b/libbb/const_hack.c
index 9575e6d67..75163fede 100644
--- a/libbb/const_hack.c
+++ b/libbb/const_hack.c
@@ -13,4 +13,14 @@ void FAST_FUNC XZALLOC_CONST_PTR(const void *pptr, size_t size)
13{ 13{
14 ASSIGN_CONST_PTR(pptr, xzalloc(size)); 14 ASSIGN_CONST_PTR(pptr, xzalloc(size));
15} 15}
16
17# if ENABLE_PLATFORM_MINGW32
18void FAST_FUNC ASSIGN_CONST_PTR(const void *pptr, const void *v)
19{
20 do {
21 *(void**)not_const_pp(pptr) = (void*)(v);
22 barrier();
23 } while (0);
24}
25# endif
16#endif 26#endif