Linux下编译tinyhttpd
来源:https://blog.csdn.net/qq673675158/article/details/104927245?spm=1001.2014.3001.5506
根据说明,
- To compile for Linux:
-
- Comment out the #include <pthread.h> line.
-
- Comment out the line that defines the variable newthread.
-
- Comment out the two lines that run pthread_create().
-
- Uncomment the line that runs accept_request().
-
- Remove -lsocket from the Makefile.
修改httpd.c文件
修改Makefile
修改htdocs/color.cgi
第一行:
#!/usr/local/bin/perl -Tw
修改为:
#!/usr/bin/perl -Tw
也就是perl所在的安装路径,不然cgi无法运行。