diff --git a/vchan/io.c b/vchan/io.c index 5d32b4e9..d6b7ac92 100644 --- a/vchan/io.c +++ b/vchan/io.c @@ -129,7 +129,7 @@ int libvchan_wait(struct libvchan *ctrl) may write less data than requested; returns the amount of data processed, -1 on error or peer close */ -int libvchan_write(struct libvchan *ctrl, char *data, int size) +int libvchan_write(struct libvchan *ctrl, const char *data, int size) { int avail, avail_contig; int real_idx; diff --git a/vchan/libvchan.h b/vchan/libvchan.h index 6b19b2fa..4307346d 100644 --- a/vchan/libvchan.h +++ b/vchan/libvchan.h @@ -78,7 +78,7 @@ struct libvchan *libvchan_server_init(int devno); struct libvchan *libvchan_client_init(int domain, int devno); int libvchan_server_handle_connected(struct libvchan *ctrl); -int libvchan_write(struct libvchan *ctrl, char *data, int size); +int libvchan_write(struct libvchan *ctrl, const char *data, int size); int libvchan_read(struct libvchan *ctrl, char *data, int size); int libvchan_wait(struct libvchan *ctrl); int libvchan_close(struct libvchan *ctrl);