Skip to content

Commit

Permalink
build: include our own copy of if.h and dependencies
Browse files Browse the repository at this point in the history
Import our a copy of Linux if.h and its dependencies
(compiler_types.h and libc-compat.h) from the above links. In "if.h",
"#include <linux/compiler.h>" has been replaced by
"#include <linux/compiler_types.h>". libc-compat.h is needed to avoid
conflicts with glibc.

Include "linux/if.h" in "zebra.h" when compiling on Linux. De-reference
"net/if.h" in C files.

Note that "net/if.h" is still needed. It is even included in many Linux
kernel files. "linux/if.h" provides additional definitions.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/if.h?h=v6.7-rc8
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/libc-compat.h?h=v6.7-rc8
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/linux/compiler_types.h?h=v6.7-rc8
Link: https://patchwork.ozlabs.org/project/glibc/patch/[email protected]/
Signed-off-by: Louis Scalbert <[email protected]>
  • Loading branch information
louis-6wind committed Jan 10, 2024
1 parent 26be39c commit 283f38b
Show file tree
Hide file tree
Showing 14 changed files with 1,036 additions and 9 deletions.
1 change: 0 additions & 1 deletion babeld/babeld.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Copyright 2011 by Matthieu Boutier and Juliusz Chroboczek

#ifndef IF_NAMESIZE
#include <sys/socket.h>
#include <net/if.h>
#endif

#ifdef HAVE_VALGRIND
Expand Down
Loading

0 comments on commit 283f38b

Please sign in to comment.