#include <sys/stat.h>
#include <sys/mman.h>
+#include "stlink-common.h"
+
+#if CONFIG_USE_LIBSG
// sgutils2 (apt-get install libsgutils2-dev)
#include <scsi/sg_lib.h>
#include <scsi/sg_pt.h>
-
-#include "stlink-common.h"
#include "stlink-sg.h"
+#endif
// Suspends execution of the calling process for
if (sl) {
struct stlink_libsg *slsg = sl->backend_data;
scsi_pt_close_device(slsg->sg_fd);
- // CAUTION!? s this right?
free(slsg);
- free(sl);
}
}