diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-07-03 10:56:08 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-07-03 10:56:08 +0200 |
commit | 9bbea50ceaf3c6defdec9971bcbac5f7c419e94d (patch) | |
tree | 9d41037bc71f1ee70582b5765b32020b9d8cd55e | |
parent | 324894cf2960d91e1c2363ba17ac9efbd4ba1263 (diff) | |
download | aports-cache-9bbea50ceaf3c6defdec9971bcbac5f7c419e94d.tar.bz2 aports-cache-9bbea50ceaf3c6defdec9971bcbac5f7c419e94d.tar.xz |
fix build on macos
-rw-r--r-- | aports-cache.c | 3 | ||||
-rw-r--r-- | main.c | 4 |
2 files changed, 7 insertions, 0 deletions
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) { @@ -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) { |