Fix C++ compilation warnings/errors under g++ 8.2.
In metadata.cc:
warning: In the GNU C Library, "major" is defined by
<sys/sysmacros.h>. For historical compatibility, it is currently
defined by <sys/types.h> as well, but we plan to remove this soon.
To use "major", include <sys/sysmacros.h> directly. If you did not
intend to use a system-defined macro "major", you should undefine it
after including <sys/types.h>.
In third_party/sha1.cc:
error: types may not be defined within __builtin_offsetof
Alter the code to always assume that buffers are
unaligned, which should be correct at the cost of performance. This
shouldn't matter much in practice since SHA-1 is mostly not being used
by Cumulus any longer.
In third_party/sha256.cc:
warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use
_DEFAULT_SOURCE"