Dear Friends, I was playing with musl and I think I may have found an issue on fwrite(): This is the original code: size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restrict f) { size_t k, l = size*nmemb; if (!size) nmemb = 0; FLOCK(f); k = __fwritex(src, l, f); FUNLOCK(f); return k==l ? nmemb : k/size; } It seems we need to check the variable size on return because if size is zero We'll have a division by zero and a segmentation fault I'm sending the attached patch that changes the return as follows: return k==l ? nmemb : (size != 0) ? k/size : k; I don't know if this is the correct approach, so, feel free to change/let me know how to fix :) Hope it helps Kind Regards, Geraldo Netto Sapere Aude => Non dvcor, dvco http://exdev.sf.net/