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>

Jeff King committed Mar 6, 2019 at 14:05 UTC 33aa579a5568451a34ea08d1ecf336480ba846a3
1 file changed +5
compat/bswap.h
+5
@@ -1,3 +1,6 @@
1 +#ifndef COMPAT_BSWAP_H
2 +#define COMPAT_BSWAP_H
3 +
4 /*
5 * Let's make sure we always have a sane definition for ntohl()/htonl().
6 * 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)
213 }
214
215 #endif
216 +
217 +#endif /* COMPAT_BSWAP_H */