Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff -ur a/src/malloc.c b/src/malloc.c 2--- a/src/malloc.c 3+++ b/src/malloc.c 4@@ -12,7 +12,6 @@ 5 #include "signals.h" 6 #include "malloc.h" 7 8-caddr_t mmalloc_base = NULL; 9 int low_memory_warning = 0; 10 static char *reserve = NULL; 11 12diff -ur a/src/malloc.h b/src/malloc.h 13--- a/src/malloc.h 14+++ b/src/malloc.h 15@@ -34,6 +34,8 @@ 16 # define realloc(ptr, size) mrealloc(NULL, ptr, size) 17 # define free(ptr) mfree(NULL, ptr) 18 #else 19+# include <stdlib.h> 20+# include <sys/types.h> 21 # define mmalloc(md, size) malloc(size) 22 # define mcalloc(md, size) calloc(size) 23 # define mrealloc(md, ptr, size) realloc(ptr, size) 24diff -ur a/src/socket.c b/src/socket.c 25--- a/src/socket.c 26+++ b/src/socket.c 27@@ -2600,7 +2600,7 @@ 28 socks_with_lines--; 29 30 if (line->attrs & (F_TFPROMPT)) { 31- incoming_text = line; 32+ incoming_text = (String*)line; 33 handle_prompt(incoming_text, 0, TRUE); 34 continue; 35 } 36diff -ur a/src/tfio.c b/src/tfio.c 37--- a/src/tfio.c 38+++ b/src/tfio.c 39@@ -70,6 +70,7 @@ 40 static void filenputs(const char *str, int n, FILE *fp); 41 static void queueputline(conString *line, TFILE *file); 42 43+extern void main_loop(void); 44 45 void init_tfio(void) 46 {