]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/env/fw_env.c
Fix musl build
[karo-tx-uboot.git] / tools / env / fw_env.c
index 30d5b037f09b21a252d15ca8fc447c570de43138..daa02a760e3744b252269113f1784671ed2fb03f 100644 (file)
@@ -8,6 +8,8 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#define _GNU_SOURCE
+
 #include <errno.h>
 #include <env_flags.h>
 #include <fcntl.h>
@@ -125,7 +127,7 @@ static int get_config (char *);
 #endif
 static inline ulong getenvsize (void)
 {
-       ulong rc = CUR_ENVSIZE - sizeof(long);
+       ulong rc = CUR_ENVSIZE - sizeof(uint32_t);
 
        if (HaveRedundEnv)
                rc -= sizeof (char);