1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-19 21:06:09 +02:00

compat/bswap: add include header guards

Our compat/bswap.h lacks the usual preprocessor guards against multiple
inclusion. This usually isn't an issue since it only gets included from
git-compat-util.h, which has its own guards. But it would produce
redeclaration errors if any file included it separately.

Our hdr-check target would complain about this, except that it currently
skips items in compat/ entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2019-03-06 14:05:10 -05:00 committed by Junio C Hamano
parent 0d0ac3826a
commit 33aa579a55

View File

@ -1,3 +1,6 @@
#ifndef COMPAT_BSWAP_H
#define COMPAT_BSWAP_H
/*
* Let's make sure we always have a sane definition for ntohl()/htonl().
* Some libraries define those as a function call, just to perform byte
@ -210,3 +213,5 @@ static inline void put_be64(void *ptr, uint64_t value)
}
#endif
#endif /* COMPAT_BSWAP_H */