]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/sysclk-lwla/lwla.c
fx2lafw, sysclk-lwla: Avoid g_stat()
[libsigrok.git] / src / hardware / sysclk-lwla / lwla.c
index 39dccbd2abb45a9e60684d0652415b3e9bf04fac..ab9fece8df1a41614d126124f6e90c34c2095875 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <config.h>
 #include <errno.h>
+#include <sys/stat.h>
 #include <glib/gstdio.h>
 #include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
  */
 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;