https://bugs.kde.org/show_bug.cgi?id=430896

            Bug ID: 430896
           Summary: macOS: fatal error: 'endian.h' file not found
           Product: ktorrent
           Version: 20.11.80
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: joris.guis...@gmail.com
          Reporter: r...@yurikoles.com
  Target Milestone: ---

SUMMARY
libktorrent doesn't build on macOS

STEPS TO REPRODUCE
1. Try to build libktorrent on macOS

OBSERVED RESULT
../src/dht/key.cpp:30:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.

Full log: https://git.io/JLyDa

EXPECTED RESULT
libktorrent should build on macOS

SOFTWARE/OS VERSIONS
macOS: 11.1 (20C69)
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
I had tried to add workaround for macOS (#include <machine/endian.h>) as for
BSD systems (patch is here:
https://invent.kde.org/packaging/homebrew-kde/-/snippets/1434), but now I see:

../src/dht/key.cpp:95:29: error: use of undeclared identifier 'htobe32'

Full log: https://git.io/JLyy0

Same issue was fixed zeromq by this PR (MPL-licensed):
https://github.com/zeromq/zmqpp/pull/174/files

A similar header is available in chromium/webrtc (under BSDL):
https://chromium.googlesource.com/external/webrtc/+/master/rtc_base/byte_order.h

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to