aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include/nolibc/nolibc.h
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2022-02-07 17:23:14 +0100
committerPaul E. McKenney <paulmck@kernel.org>2022-04-11 17:14:33 -0700
commit930c4acc064edacd2c9d5bec1a66acacb2fb2589 (patch)
treec22e4d4d1655da7fd474e2baa8a220b4003b7899 /tools/include/nolibc/nolibc.h
parenttools/nolibc: use pselect6 on RISCV (diff)
downloadlinux-dev-930c4acc064edacd2c9d5bec1a66acacb2fb2589.tar.xz
linux-dev-930c4acc064edacd2c9d5bec1a66acacb2fb2589.zip
tools/nolibc: guard the main file against multiple inclusion
Including nolibc.h multiple times results in build errors due to multiple definitions. Let's add a guard against multiple inclusions. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include/nolibc/nolibc.h')
-rw-r--r--tools/include/nolibc/nolibc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/include/nolibc/nolibc.h b/tools/include/nolibc/nolibc.h
index ad23712f9cb5..4660637d9b17 100644
--- a/tools/include/nolibc/nolibc.h
+++ b/tools/include/nolibc/nolibc.h
@@ -80,6 +80,8 @@
* https://w3challs.com/syscalls/
*
*/
+#ifndef _NOLIBC_H
+#define _NOLIBC_H
#include <asm/unistd.h>
#include <asm/ioctls.h>
@@ -2582,3 +2584,5 @@ dev_t makedev(unsigned int major, unsigned int minor)
{
return ((major & 0xfff) << 8) | (minor & 0xff);
}
+
+#endif /* _NOLIBC_H */