Skip to content

Commit 9f87e30

Browse files
committed
guard for multiple includes and multiple definitions
1 parent 04f12dc commit 9f87e30

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/utils/os_byteswap.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
// Operating System specific commands to swap bytes
6262
// C++23 refactoring: replace with std::byteswap()
6363

64+
#ifndef OS_BYTESWAP_HPP
65+
#define OS_BYTESWAP_HPP
66+
6467

6568
#if defined(_MSC_VER) || defined(_WIN32)
6669

@@ -146,3 +149,6 @@ constexpr auto bswap_64(uint64_t bsx) noexcept -> uint64_t {
146149
#include <byteswap.h>
147150

148151
#endif
152+
153+
154+
#endif // OS_BYTESWAP_HPP

0 commit comments

Comments
 (0)