Skip to content

Commit

Permalink
snabbswitch.c: Compile error on non-64bit platforms
Browse files Browse the repository at this point in the history
Provide a clear compilation error on platforms that don't have a 64bit
integer size, for example i386. Include a link to porting information
so that the user will understand that this is not an arbitrary
restriction.
  • Loading branch information
lukego committed Feb 11, 2016
1 parent 0d6470d commit aa579dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/snabbswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include "lualib.h"
#include "lauxlib.h"

#if sizeof(uint64_t) != sizeof(uintptr_t)
#error "Snabb only supports 64-bit platforms. See https://github.com/SnabbCo/snabbswitch/blob/master/src/doc/porting.md"
#end

int argc;
char** argv;

Expand Down

0 comments on commit aa579dc

Please sign in to comment.