002-fix-endianness-detect.patch 391 B

12345678910111213
  1. --- a/setup.py
  2. +++ b/setup.py
  3. @@ -100,6 +100,10 @@
  4. w(kwd.get("end", "\n"))
  5. def endianness_macro():
  6. + if os.environ["CONFIG_BIG_ENDIAN"] == "y":
  7. + return ('PCT_BIG_ENDIAN', 1)
  8. + else:
  9. + return ('PCT_LITTLE_ENDIAN', 1)
  10. s = struct.pack("@I", 0x33221100)
  11. if s == "\x00\x11\x22\x33".encode(): # little endian
  12. return ('PCT_LITTLE_ENDIAN', 1)