From eac6284cea30d02062c859f8c2cc5df2a8d324bb Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Thu, 8 Sep 2022 17:46:29 -0400 Subject: [PATCH] Add #include guards to zealbooter library files using ifndef and endif. --- zealbooter/lib.h | 5 +++++ zealbooter/memcpy.h | 4 ++++ zealbooter/print.h | 3 +++ 3 files changed, 12 insertions(+) diff --git a/zealbooter/lib.h b/zealbooter/lib.h index a3a19f56..50795a1d 100644 --- a/zealbooter/lib.h +++ b/zealbooter/lib.h @@ -1,3 +1,6 @@ +#ifndef __LIB_H__ +#define __LIB_H__ + #include #include #include @@ -6,3 +9,5 @@ uint64_t div_roundup_u64(uint64_t a, uint64_t b); uint64_t align_up_u64(uint64_t a, uint64_t b); typedef char symbol[]; + +#endif // __LIB_H__ diff --git a/zealbooter/memcpy.h b/zealbooter/memcpy.h index 6945798f..c0600149 100644 --- a/zealbooter/memcpy.h +++ b/zealbooter/memcpy.h @@ -1,4 +1,8 @@ +#ifndef __MEMCPY_H__ +#define __MEMCPY_H__ #include void *memcpy(void *s1, const void *s2, size_t n); + +#endif // __MEMCPY_H__ diff --git a/zealbooter/print.h b/zealbooter/print.h index b2b9bd34..e659b694 100644 --- a/zealbooter/print.h +++ b/zealbooter/print.h @@ -1,3 +1,6 @@ +#ifndef __PRINT_H__ +#define __PRINT_H__ int printf(const char *format, ...); +#endif // __PRINT_H__