First Commit
[librecmc/package-feed.git] / lang / python-crypto / patches / 002-fix-endianness-detect.patch
1 --- a/setup.py
2 +++ b/setup.py
3 @@ -100,6 +100,10 @@
4          w(kwd.get("end", "\n"))
5  
6  def endianness_macro():
7 +    if os.environ["CONFIG_BIG_ENDIAN"] == "y":
8 +        return ('PCT_BIG_ENDIAN', 1)
9 +    else:
10 +        return ('PCT_LITTLE_ENDIAN', 1)
11      s = struct.pack("@I", 0x33221100)
12      if s == "\x00\x11\x22\x33".encode():     # little endian
13          return ('PCT_LITTLE_ENDIAN', 1)