[ovs-git] [openvswitch/ovs] 79461d: unaligned: Make get_unaligned_be64() compatible on...

GitHub noreply at github.com
Thu Oct 9 15:37:15 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 79461d20a8d5b7aba6cae5f6fa0fad5e8ac49235
      https://github.com/openvswitch/ovs/commit/79461d20a8d5b7aba6cae5f6fa0fad5e8ac49235
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2014-10-09 (Thu, 09 Oct 2014)

  Changed paths:
    M lib/unaligned.h

  Log Message:
  -----------
  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 <aserdean at cloudbasesolutions.com>
Tested-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>




More information about the git mailing list