Linux下编译tinyhttpd

Linux下编译tinyhttpd

来源:https://blog.csdn.net/qq673675158/article/details/104927245?spm=1001.2014.3001.5506

根据说明,

  • To compile for Linux:
    1. Comment out the #include <pthread.h> line.
    1. Comment out the line that defines the variable newthread.
    1. Comment out the two lines that run pthread_create().
    1. Uncomment the line that runs accept_request().
    1. Remove -lsocket from the Makefile.

修改httpd.c文件

修改Makefile

修改htdocs/color.cgi

第一行:

#!/usr/local/bin/perl -Tw

修改为:

#!/usr/bin/perl -Tw

也就是perl所在的安装路径,不然cgi无法运行。

猜你喜欢

转载自blog.csdn.net/u013209189/article/details/127253993
今日推荐