From: Uwe Hermann Date: Tue, 8 Jan 2013 02:12:01 +0000 (+0100) Subject: link-mso19: Use more portable g_htons(). X-Git-Tag: dsupstream~361 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a24e9d0484c09f972dcb31952a1ab1559bbcdedb;p=libsigrok.git link-mso19: Use more portable g_htons(). Not all systems provide and/or htons(). Use portable and always available g_htons() from glib instead. --- diff --git a/hardware/link-mso19/protocol.c b/hardware/link-mso19/protocol.c index 350cc7d1..d94e2b6c 100644 --- a/hardware/link-mso19/protocol.c +++ b/hardware/link-mso19/protocol.c @@ -20,7 +20,6 @@ */ #include "protocol.h" -#include /* serial protocol */ #define mso_trans(a, v) \ @@ -55,7 +54,7 @@ SR_PRIV int mso_send_control_message(struct sr_serial_dev_inst *serial, p += sizeof(mso_head); for (i = 0; i < n; i++) { - *(uint16_t *) p = htons(payload[i]); + *(uint16_t *) p = g_htons(payload[i]); p += 2; } memcpy(p, mso_foot, sizeof(mso_foot));