Message ID | FA8A00D8-7901-469C-A800-912C0D48EE47@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | [libubootenv] compile error on FreeBSD 13.2-RELEASE-p9? | expand |
Hi Christian, On 19.01.24 17:35, 'Storm, Christian' via swupdate wrote: > Hi, > > I just tried a "casual Friday" compile of libubootenv on a fresh > FreeBSD 13.2-RELEASE-p9 and needed the following workaround to get > it to compile: > > - - - - - - - - - - - <> - - - - - - - - - - - > > --- a/src/uboot_private.h > +++ b/src/uboot_private.h > @@ -51,13 +51,13 @@ > #define ENODATA ENODEV > > struct mtd_info_user { > - u8 type; > - u32 flags; > - u32 size; /* Total size of the MTD */ > - u32 erasesize; > - u32 writesize; > - u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ > - u64 padding; /* Old obsolete field; do not use */ > + uint8_t type; > + uint32_t flags; > + uint32_t size; /* Total size of the MTD */ > + uint32_t erasesize; > + uint32_t writesize; > + uint32_t oobsize; /* Amount of OOB data per block (e.g. 16) */ > + uint64_t padding; /* Old obsolete field; do not use */ > }; > #endif > - - - - - - - - - - - <> - - - - - - - - - - - > > Is it just me (probably having had some leftovers on the last FreeBSD test) > or doesn't libubootenv compile on FreeBSD, currently? > I'm happy to send a proper patch if this is the case... I confirm this, it seems I forget these changes when I took the patch from my FreeBSD build and I imported in my Linux environemnt. On FreeBSD, I have still this file patched: diff --git a/src/uboot_private.h b/src/uboot_private.h index 091bd42..a58af19 100644 --- a/src/uboot_private.h +++ b/src/uboot_private.h @@ -48,14 +48,15 @@ #define MTDLOCK #define MTDUNLOCK +#define ENODATA ENODEV + struct mtd_info_user { - u8 type; - u32 flags; - u32 size; /* Total size of the MTD */ - u32 erasesize; - u32 writesize; - u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ - u64 padding; /* Old obsolete field; do not use */ + uint8_t type; + uint32_t flags; + uint32_t size; /* Total size of the MTD */ + uint32_t erasesize; + uint32_t writesize; + uint32_t oobsize; /* Amount of OOB data per block (e.g. 16) */ }; #endif So yes, please send the patch to fix it. Best regards, Stefano
--- a/src/uboot_private.h +++ b/src/uboot_private.h @@ -51,13 +51,13 @@ #define ENODATA ENODEV struct mtd_info_user { - u8 type; - u32 flags; - u32 size; /* Total size of the MTD */ - u32 erasesize; - u32 writesize; - u32 oobsize; /* Amount of OOB data per block (e.g. 16) */ - u64 padding; /* Old obsolete field; do not use */ + uint8_t type; + uint32_t flags; + uint32_t size; /* Total size of the MTD */ + uint32_t erasesize; + uint32_t writesize; + uint32_t oobsize; /* Amount of OOB data per block (e.g. 16) */ + uint64_t padding; /* Old obsolete field; do not use */ }; #endif - - - - - - - - - - - <> - - - - - - - - - - -