]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/comms.c
FIX: APDUCodeTable has more items than 100 (#682)
[proxmark3-svn] / client / comms.c
index be0cfd103ba610c4b35e225bf28cf96949b739b2..2030f8f3ea6010946bbc990aa1dcbc805c9bbbfd 100644 (file)
@@ -12,7 +12,7 @@
 #include "comms.h"
 
 #include <pthread.h>
 #include "comms.h"
 
 #include <pthread.h>
-#ifdef __linux__
+#if defined(__linux__) && !defined(NO_UNLINK)
 #include <unistd.h>            // for unlink()
 #endif
 #include "uart.h"
 #include <unistd.h>            // for unlink()
 #endif
 #include "uart.h"
@@ -339,8 +339,10 @@ void CloseProxmark(void) {
                uart_close(sp);
        }
 
                uart_close(sp);
        }
 
-#ifdef __linux__
+#if defined(__linux__) && !defined(NO_UNLINK)
        // Fix for linux, it seems that it is extremely slow to release the serial port file descriptor /dev/*
        // Fix for linux, it seems that it is extremely slow to release the serial port file descriptor /dev/*
+       //
+       // This may be disabled at compile-time with -DNO_UNLINK (used for a JNI-based serial port on Android).
        if (serial_port_name) {
                unlink(serial_port_name);
        }
        if (serial_port_name) {
                unlink(serial_port_name);
        }
Impressum, Datenschutz