From 9bbea50ceaf3c6defdec9971bcbac5f7c419e94d Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 3 Jul 2017 10:56:08 +0200 Subject: fix build on macos --- aports-cache.c | 3 +++ main.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/aports-cache.c b/aports-cache.c index f185e7f..303239a 100644 --- a/aports-cache.c +++ b/aports-cache.c @@ -20,6 +20,9 @@ #define debug_printf(args...) #endif +#if defined(__APPLE__) +#define st_mtim st_mtimespec +#endif static int spawn_shell_pipe(char *const argv[], pid_t *pid, int outfd) { diff --git a/main.c b/main.c index 5af6663..c3a4203 100644 --- a/main.c +++ b/main.c @@ -10,6 +10,8 @@ #include "aports-cache.h" +static char *program_invocation_name; + static void usage(int exitcode) { printf("usage %s [OPTS] DIR\n" @@ -40,6 +42,8 @@ int main(int argc, char *argv[]) int dirfd, rc; char *shell_argv[] = {"/bin/sh", NULL}; + program_invocation_name = argv[0]; + while ((c = getopt_long(argc, argv, "fs:v", opts, &i)) != -1) { switch(c) { -- cgit v1.2.3