summaryrefslogblamecommitdiffstats
path: root/network/bozohttpd/fix_warnings.diff
blob: 1a94ba656df6cdb3b41dbf69ebc11e5ddd356d3b (plain) (tree)
1
2
3
4



                                                                                   










                       
                   
 





                                                                                   


                       




                        












                                                                                                    









                       


                                                                                   








                                                            
                    
diff -Naur bozohttpd-20240126/auth-bozo.c bozohttpd-20240126.patched/auth-bozo.c
--- bozohttpd-20240126/auth-bozo.c	2024-02-04 00:55:04.000000000 -0500
+++ bozohttpd-20240126.patched/auth-bozo.c	2024-02-06 23:34:21.493549206 -0500
@@ -34,11 +34,15 @@
 
 #ifdef DO_HTPASSWD
 
+#define _XOPEN_SOURCE
+
 #include <sys/param.h>
 
 #include <string.h>
+#include <strings.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <crypt.h>
 
 #include "bozohttpd.h"
 
diff -Naur bozohttpd-20240126/bozohttpd.c bozohttpd-20240126.patched/bozohttpd.c
--- bozohttpd-20240126/bozohttpd.c	2024-02-04 00:55:04.000000000 -0500
+++ bozohttpd-20240126.patched/bozohttpd.c	2024-02-06 23:45:26.157486654 -0500
@@ -122,6 +122,8 @@
  * And so it begins ..
  */
 
+#include <stdio.h>
+
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/time.h>
@@ -145,6 +147,9 @@
 #include <time.h>
 #include <unistd.h>
 
+extern char *strptime(const char *restrict s, const char *restrict format, struct tm *restrict tm);
+extern int vasprintf(char **restrict strp, const char *restrict fmt, va_list ap);
+
 #include "bozohttpd.h"
 
 #ifndef SSL_TIMEOUT
diff -Naur bozohttpd-20240126/lua-bozo.c bozohttpd-20240126.patched/lua-bozo.c
--- bozohttpd-20240126/lua-bozo.c	2024-02-04 00:55:04.000000000 -0500
+++ bozohttpd-20240126.patched/lua-bozo.c	2024-02-06 23:16:22.339650764 -0500
@@ -32,6 +32,9 @@
 
 #ifndef NO_LUA_SUPPORT
 
+#define _GNU_SOURCE
+#include <stdio.h>
+
 #include <sys/param.h>
 
 #include <lua.h>
diff -Naur bozohttpd-20240126/ssl-bozo.c bozohttpd-20240126.patched/ssl-bozo.c
--- bozohttpd-20240126/ssl-bozo.c	2024-02-04 00:55:04.000000000 -0500
+++ bozohttpd-20240126.patched/ssl-bozo.c	2024-02-06 23:16:22.339650764 -0500
@@ -32,6 +32,9 @@
 
 /* this code implements SSL and backend IO for bozohttpd */
 
+/* need this for vasprintf(): */
+#define _GNU_SOURCE
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>