Skip to content

Commit

Permalink
Merge branch 'jk/guard-bswap-header'
Browse files Browse the repository at this point in the history
The include file compat/bswap.h has been updated so that it is safe
to (accidentally) include it more than once.

* jk/guard-bswap-header:
  compat/bswap: add include header guards
  • Loading branch information
gitster committed Mar 11, 2019
2 parents 0f519ab + 33aa579 commit 2274fc7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compat/bswap.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -210,3 +213,5 @@ static inline void put_be64(void *ptr, uint64_t value)
}

#endif

#endif /* COMPAT_BSWAP_H */

0 comments on commit 2274fc7

Please sign in to comment.