The ntohs() from <arpa/inet.h> is not available on MinGW/Windows. There
are ways to work around this, but as we use glib already, using g_ntohs()
is the best option anyway.
#include <string.h>
#include <sys/time.h>
#include <inttypes.h>
-#include <arpa/inet.h>
#include <glib.h>
#include <libusb.h>
#include "sigrok.h"
#include <string.h>
#include <glib.h>
#include <libusb.h>
-#include <arpa/inet.h>
extern libusb_context *usb_context;
extern GSList *dev_insts;
*/
for (chan = 0; chan < 2; chan++) {
for (v = 0; v < 9; v++) {
- ctx->channel_levels[chan][v][0] = ntohs(ctx->channel_levels[chan][v][0]);
- ctx->channel_levels[chan][v][1] = ntohs(ctx->channel_levels[chan][v][1]);
+ ctx->channel_levels[chan][v][0] = g_ntohs(ctx->channel_levels[chan][v][0]);
+ ctx->channel_levels[chan][v][1] = g_ntohs(ctx->channel_levels[chan][v][1]);
}
}