#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
-#include <assert.h>
#include <sys/mman.h>
// Wrapper for `read` that retries on partial reads.
// - -1: error
// - 0: stream ended
// - 1: no problems occured
-PUBLIC_FN ssize_t write_nointr(int fd, void *buf, ssize_t count, int *last_res) {
+PUBLIC_FN ssize_t write_nointr(int fd, const void *buf, ssize_t count, int *last_res) {
if (count == -1) count = strlen(buf);
errno = 0;
size_t done = 0;
fclose(*in);
err_out:
return EAI_SYSTEM;
-}
\ No newline at end of file
+}