MINOR: haproxy: export main to ease access from debugger
Better just export main instead of declaring it as extern, it's cleaner
and may be usable elsewhere.
(cherry picked from commit 1827845a3d9f15e2186e1e65dd925e8e7912fab4)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 06ac86fa26fc8ab20a91c5862ad0c1568c5713b2)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/include/types/global.h b/include/types/global.h
index 36bbb8e..eab3345 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -295,6 +295,7 @@
int tell_old_pids(int sig);
int delete_oldpid(int pid);
+int main(int argc, char **argv);
void deinit(void);
void hap_register_build_opts(const char *str, int must_free);
void hap_register_post_check(int (*fct)());
diff --git a/src/debug.c b/src/debug.c
index f0cfdd1..16b7b1d 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -93,7 +93,6 @@
const struct stream *s = NULL;
const struct appctx __maybe_unused *appctx = NULL;
struct hlua __maybe_unused *hlua = NULL;
- extern int main(int, char **);
if (!task) {
chunk_appendf(buf, "0\n");