]> git.proxmox.com Git - mirror_ovs.git/commit - acinclude.m4
sparse: Configure target operating system and fix fallout.
authorBen Pfaff <blp@ovn.org>
Tue, 23 Apr 2019 23:42:32 +0000 (16:42 -0700)
committerBen Pfaff <blp@ovn.org>
Wed, 24 Apr 2019 15:37:08 +0000 (08:37 -0700)
commit0cdd5b13de91b989dc92246e20ee6d528417df97
tree90658b62a4d3eaa05641fc7ac1c9bb86ea409f78
parent46124c18b093bee851f30c9fc938c1ff8c2c75ee
sparse: Configure target operating system and fix fallout.

cgcc, the "sparse" wrapper that OVS uses, can be told the host architecture
or the host OS or both.  Until now, OVS has told it the host architecture
because it is fairly common that it doesn't guess it automatically.  Until
now, OS has not told it the host OS, assuming that it would get it right.
However, it doesn't--if you tell it the host OS or the host architecture,
it doesn't really have a default for the other.  This means that on Linux
(presumably the only OS where sparse works properly for OVS), it was not
defining __linux__, which caused some weird behavior.

This commit adds a flag to the cgcc invocation to make it define __linux__
on Linux, and it fixes some errors that this would otherwise cause.

Acked-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
acinclude.m4
include/sparse/automake.mk
include/sparse/linux/if_packet.h [new file with mode: 0644]
lib/perf-counter.c