diff --git a/src/hardware/fx2lafw/dslogic.c b/src/hardware/fx2lafw/dslogic.c index 84d210b3..7363faac 100644 --- a/src/hardware/fx2lafw/dslogic.c +++ b/src/hardware/fx2lafw/dslogic.c @@ -39,7 +39,7 @@ int dslogic_fpga_firmware_upload(const struct sr_dev_inst *sdi, const char *filename) { FILE *fw; - GStatBuf st; + struct stat st; struct sr_usb_dev_inst *usb; int chunksize, result, ret; unsigned char *buf; @@ -49,7 +49,7 @@ int dslogic_fpga_firmware_upload(const struct sr_dev_inst *sdi, sr_dbg("Uploading FPGA firmware at %s.", filename); usb = sdi->conn; - if (g_stat(filename, &st) < 0) { + if (stat(filename, &st) < 0) { sr_err("Unable to upload FPGA firmware: %s", g_strerror(errno)); return SR_ERR; } diff --git a/src/hardware/sysclk-lwla/lwla.c b/src/hardware/sysclk-lwla/lwla.c index 39dccbd2..ab9fece8 100644 --- a/src/hardware/sysclk-lwla/lwla.c +++ b/src/hardware/sysclk-lwla/lwla.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include "libsigrok-internal.h" @@ -33,13 +34,13 @@ */ static unsigned char *load_bitstream_file(const char *filename, int *length_p) { - GStatBuf statbuf; + struct stat statbuf; FILE *file; unsigned char *stream; size_t length, count; /* Retrieve and validate the file size. */ - if (g_stat(filename, &statbuf) < 0) { + if (stat(filename, &statbuf) < 0) { sr_err("Failed to access bitstream file: %s.", g_strerror(errno)); return NULL;