summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-12 21:56:30 -0500
committermidipix <writeonce@midipix.org>2016-11-10 23:35:32 -0500
commit467be12a0871d771e198fc23a2bfdc9843fc4a2b (patch)
tree28593ed6f856cca81c3aa5a7dbbeda8a5733aeab
parenta9788eed709a6060b7e99b99832197a3c2e93496 (diff)
downloadperk-467be12a0871d771e198fc23a2bfdc9843fc4a2b.tar.bz2
perk-467be12a0871d771e198fc23a2bfdc9843fc4a2b.tar.xz
perk.c: support as-is inclusion in multi-call binary projects.
-rw-r--r--src/perk.c6
1 files changed, 5 insertions, 1 deletions
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