...
From 751bb8a69dc0e9a0ae60854afbef60f3a3c74148 Mon Sep 17 00:00:00 2001 From: Christian Franke <christian.fra...@t-online.de> Date: Wed, 4 Sep 2019 22:53:36 +0200 Subject: [PATCH] header: _FORTIFY_SOURCE: Add _read() and read().
Signed-off-by: Christian Franke <christian.fra...@t-online.de> --- mingw-w64-headers/crt/io.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mingw-w64-headers/crt/io.h b/mingw-w64-headers/crt/io.h index 4a5b08ba..30b5a7b8 100644 --- a/mingw-w64-headers/crt/io.h +++ b/mingw-w64-headers/crt/io.h @@ -370,6 +370,26 @@ int __cdecl __mingw_access (const char *__fname, int __mode); #define access(__f,__m) __mingw_access (__f, __m) #endif +#if __MINGW_FORTIFY_LEVEL > 0 + +_CRTIMP int __cdecl __mingw_call__read(int, void *, unsigned int) __MINGW_ASM_CRT_CALL(_read); + +__mingw_bos_extern_ovr +int _read(int __fh, void * __dst, unsigned int __n) +{ + __mingw_bos_ptr_chk_warn(__dst, __n); + return __mingw_call__read(__fh, __dst, __n); +} + +#ifndef NO_OLDNAMES +__mingw_bos_extern_ovr +int read(int __fh, void * __dst, unsigned int __n) +{ + return _read(__fh, __dst, __n); +} +#endif + +#endif /* __MINGW_FORTIFY_LEVEL > 0 */ #ifdef __cplusplus } -- 2.21.0
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public