summaryrefslogtreecommitdiff
path: root/utils/mifare-tool.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mifare-tool.c')
-rw-r--r--utils/mifare-tool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/mifare-tool.c b/utils/mifare-tool.c
index 4062eaa..aebd0d0 100644
--- a/utils/mifare-tool.c
+++ b/utils/mifare-tool.c
@@ -21,7 +21,7 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <libgen.h>
+//#include <libgen.h>
#define _GNU_SOURCE
#include <getopt.h>
@@ -95,7 +95,12 @@ int main(int argc, char **argv)
unsigned int page;
char key[MIFARE_CL_KEY_LEN];
char buf[MIFARE_CL_PAGE_SIZE];
+
+#ifdef __MINGW32__
+ program_name = argv[0];
+#else
program_name = basename(argv[0]);
+#endif/*__MINGW32__*/
memcpy(key, MIFARE_CL_KEYA_DEFAULT_INFINEON,
sizeof(MIFARE_CL_KEYA_DEFAULT_INFINEON));
personal git repositories of Harald Welte. Your mileage may vary