diff options
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/Makefile | 5 | ||||
-rw-r--r-- | sysdep/unix/Modules | 12 | ||||
-rw-r--r-- | sysdep/unix/config.Y | 2 | ||||
-rw-r--r-- | sysdep/unix/io.c | 6 | ||||
-rw-r--r-- | sysdep/unix/krt.Y | 2 | ||||
-rw-r--r-- | sysdep/unix/krt.c | 2 | ||||
-rw-r--r-- | sysdep/unix/krt.h | 5 | ||||
-rw-r--r-- | sysdep/unix/log.c | 2 | ||||
-rw-r--r-- | sysdep/unix/main.c | 6 | ||||
-rw-r--r-- | sysdep/unix/unix.h | 6 |
10 files changed, 23 insertions, 25 deletions
diff --git a/sysdep/unix/Makefile b/sysdep/unix/Makefile new file mode 100644 index 00000000..c5d55431 --- /dev/null +++ b/sysdep/unix/Makefile @@ -0,0 +1,5 @@ +src := io.c krt.c log.c main.c random.c +obj := $(src-o-files) +$(all-daemon) +$(cf-local) +$(conf-y-targets): $(s)krt.Y diff --git a/sysdep/unix/Modules b/sysdep/unix/Modules deleted file mode 100644 index 2c6514df..00000000 --- a/sysdep/unix/Modules +++ /dev/null @@ -1,12 +0,0 @@ -log.c -main.c -timer.h -io.c -unix.h -endian.h -config.Y -random.c - -krt.c -krt.h -krt.Y diff --git a/sysdep/unix/config.Y b/sysdep/unix/config.Y index f9a92900..ebadd454 100644 --- a/sysdep/unix/config.Y +++ b/sysdep/unix/config.Y @@ -8,7 +8,7 @@ CF_HDR -#include "lib/unix.h" +#include "sysdep/unix/unix.h" #include <stdio.h> CF_DECLS diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index cbfb47d5..afa51be7 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -31,14 +31,14 @@ #include "nest/bird.h" #include "lib/lists.h" #include "lib/resource.h" -#include "lib/timer.h" +#include "sysdep/unix/timer.h" #include "lib/socket.h" #include "lib/event.h" #include "lib/string.h" #include "nest/iface.h" -#include "lib/unix.h" -#include "lib/sysio.h" +#include "sysdep/unix/unix.h" +#include CONFIG_INCLUDE_SYSIO_H /* Maximum number of calls of tx handler for one socket in one * select iteration. Should be small enough to not monopolize CPU by diff --git a/sysdep/unix/krt.Y b/sysdep/unix/krt.Y index 1cd73502..91317d97 100644 --- a/sysdep/unix/krt.Y +++ b/sysdep/unix/krt.Y @@ -8,7 +8,7 @@ CF_HDR -#include "lib/krt.h" +#include "sysdep/unix/krt.h" CF_DEFINES diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 6b3b4eee..38f31235 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -56,7 +56,7 @@ #include "nest/route.h" #include "nest/protocol.h" #include "filter/filter.h" -#include "lib/timer.h" +#include "sysdep/unix/timer.h" #include "conf/conf.h" #include "lib/string.h" diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h index e968ad57..cb404de3 100644 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@ -15,7 +15,8 @@ struct krt_proto; struct kif_config; struct kif_proto; -#include "lib/krt-sys.h" +#include "sysdep/config.h" +#include CONFIG_INCLUDE_KRTSYS_H /* Flags stored in net->n.flags, rest are in nest/route.h */ @@ -111,7 +112,7 @@ struct kif_proto { struct kif_state sys; /* Sysdep state */ }; -struct kif_proto *kif_proto; +extern struct kif_proto *kif_proto; #define KIF_CF ((struct kif_config *)p->p.cf) diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index 7cb26360..8daff034 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -26,7 +26,7 @@ #include "nest/mrtdump.h" #include "lib/string.h" #include "lib/lists.h" -#include "lib/unix.h" +#include "sysdep/unix/unix.h" static FILE *dbgf; static list *current_log_list; diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 8796ab9c..14b3b2f6 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -69,7 +69,7 @@ async_dump(void) */ #ifdef CONFIG_RESTRICTED_PRIVILEGES -#include "lib/syspriv.h" +#include CONFIG_INCLUDE_SYSPRIV_H #else static inline void @@ -567,6 +567,10 @@ sysdep_shutdown_done(void) * Signals */ +volatile int async_config_flag; +volatile int async_dump_flag; +volatile int async_shutdown_flag; + static void handle_sighup(int sig UNUSED) { diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h index 414b6ca4..80c99350 100644 --- a/sysdep/unix/unix.h +++ b/sysdep/unix/unix.h @@ -91,9 +91,9 @@ int sockaddr_read(sockaddr *sa, int af, ip_addr *a, struct iface **ifa, uint *po #define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path)) #endif -volatile int async_config_flag; -volatile int async_dump_flag; -volatile int async_shutdown_flag; +extern volatile int async_config_flag; +extern volatile int async_dump_flag; +extern volatile int async_shutdown_flag; void io_init(void); void io_loop(void); |