将返回值与EBUSY进行比较

pma*_*c89 2 c mutex pthreads

所以,我在这行代码上遇到错误;

else if(lockError == EBUSY)
Run Code Online (Sandbox Code Playgroud)

我得到了错误;

use of undeclared identifier 'EBUSY'
Run Code Online (Sandbox Code Playgroud)

如何将我的int lockError与我尝试pthread_mutex_unlock时可能返回的EBUSY进行比较.

P.P*_*.P. 6

你忘了,包括#include<errno.h>其中EBSUY的定义.见errno.h.