Skip to content

Commit

Permalink
Fix LoRaMac for zig cc
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jun 3, 2022
1 parent b04be66 commit e36b54e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/mac/LoRaMac.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
*
* \author Johannes Bruder ( STACKFORCE )
*/
#if defined(__NuttX__) && defined(__clang__) // Workaround for NuttX with zig cc
#include <arch/types.h>
#include "../../nuttx/include/limits.h"
#endif // defined(__NuttX__) && defined(__clang__)

#include <stdio.h>
#include "../boards/utilities.h"
#include "region/Region.h"
#include "LoRaMacClassB.h"
Expand Down Expand Up @@ -3614,6 +3620,11 @@ static uint8_t IsRequestPending( void )

LoRaMacStatus_t LoRaMacInitialization( LoRaMacPrimitives_t* primitives, LoRaMacCallback_t* callbacks, LoRaMacRegion_t region )
{
#ifdef __clang__
puts("LoRaMacInitialization: Compiled with zig cc");
#else
puts("LoRaMacInitialization: Compiled with gcc");
#endif // __clang__
GetPhyParams_t getPhy;
PhyParam_t phyParam;

Expand Down

0 comments on commit e36b54e

Please sign in to comment.