[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/REDIS PATCH 4/4] Provide main() function for Redis server if configured to do so
We add a config option for enabling the main() function provided by our Redis server glue code. Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx> --- Config.uk | 6 ++++++ Makefile.uk | 2 ++ server_main.c | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 server_main.c diff --git a/Config.uk b/Config.uk index 1dd4f9d..4f05102 100644 --- a/Config.uk +++ b/Config.uk @@ -19,4 +19,10 @@ config LIBREDIS_SERVER default y help Build the Redis server library. + + if LIBREDIS_SERVER + config LIBREDIS_SERVER_MAIN_FUNCTION + bool "Provide main function" + default n + endif endif diff --git a/Makefile.uk b/Makefile.uk index ae55caf..d80c8be 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -82,6 +82,8 @@ LIBREDIS_SERVER_CFLAGS-y += -Wno-missing-field-initializers ################################################################################ # Sources ################################################################################ +LIBREDIS_SERVER_SRCS-$(CONFIG_LIBREDIS_SERVER_MAIN_FUNCTION) += $(LIBREDIS_BASE)/server_main.c|unikraft + LIBREDIS_SERVER_SRCS-y += $(LIBREDIS_SRC)/adlist.c LIBREDIS_SERVER_SRCS-y += $(LIBREDIS_SRC)/ae.c LIBREDIS_SERVER_SRCS-y += $(LIBREDIS_SRC)/anet.c diff --git a/server_main.c b/server_main.c new file mode 100644 index 0000000..ed1c141 --- /dev/null +++ b/server_main.c @@ -0,0 +1,6 @@ +extern int redis_main(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + return redis_main(argc, argv); +} -- 2.20.1 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |