From 467be12a0871d771e198fc23a2bfdc9843fc4a2b Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 12 Dec 2015 21:56:30 -0500 Subject: perk.c: support as-is inclusion in multi-call binary projects. --- src/perk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/perk.c b/src/perk.c index 00a44b1..7828784 100644 --- a/src/perk.c +++ b/src/perk.c @@ -60,7 +60,7 @@ static int perk_exit(struct pe_driver_ctx * dctx, int nerrors) return nerrors ? 2 : 0; } -static int perk_main(int argc, const char ** argv, const char ** envp) +int perk_main(int argc, const char ** argv, const char ** envp) { int ret; struct pe_driver_ctx * dctx; @@ -85,7 +85,11 @@ static int perk_main(int argc, const char ** argv, const char ** envp) return perk_exit(dctx,ret); } +#ifndef PERK_IN_A_BOX + int main(int argc, const char ** argv, const char ** envp) { return perk_main(argc,argv,envp); } + +#endif -- cgit v1.2.3