diff --git a/libserialport.h.in b/libserialport.h.in index 49697a9..1dd4715 100644 --- a/libserialport.h.in +++ b/libserialport.h.in @@ -426,7 +426,7 @@ char *sp_get_port_description(struct sp_port *port); * * @since 0.1.1 */ -enum sp_transport sp_get_port_transport(struct sp_port *port); +enum sp_transport sp_get_port_transport(const struct sp_port *port); /** * Get the USB bus number and address on bus of a USB serial adapter port. diff --git a/serialport.c b/serialport.c index 9826df4..272bdf6 100644 --- a/serialport.c +++ b/serialport.c @@ -136,7 +136,7 @@ SP_API char *sp_get_port_description(struct sp_port *port) RETURN_STRING(port->description); } -SP_API enum sp_transport sp_get_port_transport(struct sp_port *port) +SP_API enum sp_transport sp_get_port_transport(const struct sp_port *port) { TRACE("%p", port);