Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unaligned: Make get_unaligned_be64() compatible on GCC and non-GCC.
Until now, with GCC, get_unaligned_be64() had an interface that accepted a "ovs_be64 *", and with other compilers its accepted any pointer-to-64-bit type, but not void *. This commit fixes the problem, making the interface the same in both cases. This fixes a build error on MSVC: lib/nx-match.c(320) : error C2100: illegal indirection lib/nx-match.c(320) : error C2034: 'build_assert_failed' : type of bit field too small for number of bits lib/nx-match.c(320) : error C2296: '%' : illegal, left operand has type 'void *' lib/nx-match.c(320) : error C2198: 'ntohll' : too few arguments for call It might appear that this patch changes get_unaligned_u64() but in fact it onloy moves it earlier in the file (since it is now called from the non-GCC fork of the #if). Reported-by: Alin Serdean <[email protected]> Tested-by: Alin Gabriel Serdean <[email protected]> Acked-by: Alin Gabriel Serdean <[email protected]> Signed-off-by: Ben Pfaff <[email protected]>
- Loading branch information