Hi

I compiled and linked libwebserver-0.5.3 against musl.

It would just strangely break halfway through a request. After hours of searching, I found the problem.

I can demonstrate it with the following code:

#include <unistd.h>
#include <stdio.h>

int main() {
    FILE *fstream;

    fclose(stdout);

    fstream=freopen("/dev/tty","w",stdout);

    if (fstream==NULL) {
        fprintf(stderr,"freopen failed\n");
    }

    printf("test this\n");
   

    return 0;
}

This snippet works fine when using glibc.

Regards
Paul