Comment 5 for bug 766861

Revision history for this message
ffsdmad (ffsdmad) wrote : Re: [Bug 766861] Re: error make, undefined reference to `htobe32'

added to the definition of a macro function

784 #include <endian.h>
785
786 uint32_t htobe32(uint32_t x) {
787 union { uint32_t u32; uint8_t v[4]; } ret;
788 ret.v[0] = (uint8_t)(x >> 24);
789 ret.v[1] = (uint8_t)(x >> 16);
790 ret.v[2] = (uint8_t)(x >> 8);
791 ret.v[3] = (uint8_t) x;
792 return ret.u32;
793 }
794
795 #define swapbytes(a) do { (a) = htobe32(a); } while (0)

all okay, thanks

2011/4/20 JussiP <email address hidden>

> Your distro is too old. The hto* functions are relatively new and not
> available in old glibc headers.
>
> If you want to make it work, you have to patch it yourself. Sorry.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/766861
>
> Title:
> error make, undefined reference to `htobe32'
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/cuneiform-linux/+bug/766861/+subscribe
>