我在这段代码中收到与err_sys()相关的错误:
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> int main() { int sockfd; if ((sockfd=socket(AF_INET,SOCK_STREAM,0))<0) err_sys("can't create socket"); close(sockfd); return 0; }
/tmp/cciuUVhz.o: In function `main': getsockopt.c:(.text+0x38): undefined reference to `err_sys' collect2: ld returned 1 exit status
函数err_sys()在哪里定义?