get the errno value
This commit is contained in:
parent
cf443e62b5
commit
78ea32b3d9
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define BUFFER_SIZE 256
|
||||
|
||||
@ -18,7 +19,7 @@ int main()
|
||||
if (fp == NULL)
|
||||
{
|
||||
perror("fopen failed.");
|
||||
printf("errno = %d\n", errno);
|
||||
printf("errno = %d\n", __errno());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user