How to resolve compiler warning 'implicit declaration of function memset'

前端 未结 5 940
终归单人心
终归单人心 2021-02-01 02:45

My c code uses \'memset\' and \'close\'. And I have added:

#include 
#include 
#include 

But I sti

5条回答
  •  清酒与你
    2021-02-01 03:11

    Old question but I had similar issue and I solved it by adding

    extern void* memset(void*, int, size_t);
    

    or just

    extern void* memset();
    

    at the top of translation unit ( *.c file ).

提交回复
热议问题