../src/Main.c:402: error: conflicting types for '__exit'
../src/Main.h:508: error: previous declaration of '__exit' was here
../src/Main.c:416: error: conflicting types for '_reboot'
../src/Main.h:509: error: previous declaration of '_reboot' was here
../src/Main.h:508: error: previous declaration of '__exit' was here
../src/Main.c:416: error: conflicting types for '_reboot'
../src/Main.h:509: error: previous declaration of '_reboot' was here
原因是头文的函数声明与c文件的函数的定义的形参不一样
extern int _reboot(const char *pau1Tmp, char* ptrFile, const char* ptrFunctionName, int iLineNo);
int _reboot(const char *pau1Tmp, char* ptrFile, char* ptrFunctionName, int iLineNo) { _FPR("系统重启 reboot %s File:%s , Function : %s , Line : %d ", pau1Tmp, ptrFile, ptrFunctionName, iLineNo); { char caStr[256]; snprintf(caStr, sizeof(caStr), "echo '\"'`date`'\"' LINE:%d FILE:%s %s %s %s %s >> /usr/bike/log/reboot.log", iLineNo, ptrFunctionName, ptrFile, g_caApppName, pau1Tmp, "reboot"); PR("%s", caStr); _system(caStr); } return 0; }