From b3780a071ca06d33d4dd2d0892d74df714ffb542 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 2 Jun 2015 12:13:18 -0600 Subject: [PATCH] Damn. THTTPD will not yet run with binfs because it wants an index.html file. THTTPD does support indexing directories if CONFIG_THTTPD_GENERATE_INDICES=y, but there are some compilation issues that need to be fixed when that option is selected. --- netutils/thttpd/libhttpd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 56948e2c7..0f41b97e6 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -88,7 +88,7 @@ #define NAMLEN(dirent) strlen((dirent)->d_name) -extern char *crypt(const char *key, const char *setting); +extern CODE char *crypt(const char *key, const char *setting); #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b)) @@ -1563,7 +1563,11 @@ static void ls_child(int argc, char **argv) struct stat lsb; char modestr[20]; char *linkprefix; +#if 0 char link[MAXPATHLEN + 1]; +#else + char link[1]; +#endif char *fileclass; time_t now; char *timestr; @@ -1640,6 +1644,7 @@ static void ls_child(int argc, char **argv) nameptrs[nnames][namlen] = '\0'; ++nnames; } + closedir(dirp); /* Sort the names. */ @@ -1818,7 +1823,6 @@ static int ls(httpd_conn *hc) struct stat lsb; char modestr[20]; char *linkprefix; - char link[MAXPATHLEN + 1]; char *fileclass; time_t now; char *timestr;