linguini1 commented on issue #13704:
URL: https://github.com/apache/nuttx/issues/13704#issuecomment-2458636458

   I managed to get the build working by adding the following lines above the 
included headers:
   ```c
   #define cpu_to_le16 __builtin_bswap16
   #define hweight8 __builtin_popcount
   #define le32_to_cpu __builtin_bswap32
   #define BIT(x) (1 << x)
   ```
   
   I maybe these macros could be defined by NuttX in `compiler.h` or `endian.h` 
for systems where bswap functions exist? The gcc built-ins will do the job and 
this should solve the problem for Arch Linux while keeping builds working on 
Ubuntu. I did confirm after a successful build that running the IEEE802.11 
driver worked (did this by using the Pico W `telnet` configuration and checking 
that I could connect to my home network and ping google.com).
   
   @anchao @zhhyu7 I must admit that this is out of my element, what are your 
thoughts on this potential solution?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to