summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index 4ee7aa8..f2320bc 100644
--- a/main.c
+++ b/main.c
@@ -11,7 +11,9 @@
#include "aports-cache.h"
+#ifndef HAVE_PROGRAM_INVOCATION_NAME
static char *program_invocation_name;
+#endif
static void usage(int exitcode)
{
@@ -45,8 +47,9 @@ int main(int argc, char *argv[])
int dirfd, rc;
char *shell_argv[] = {"/bin/sh", NULL};
+#ifndef HAVE_PROGRAM_INVOCATION_NAME
program_invocation_name = argv[0];
-
+#endif
while ((c = getopt_long(argc, argv, "fs:v", opts, &i)) != -1) {
switch(c) {