There were removed in my previous commit
5851dee due
to compilation errors. It actually appears these signals
are supported in MinGW but there was an include error for
MinGW, this commit fixes it.
*/
#include <getopt.h>
+#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <signal.h>
#endif
#include <stlink-common.h>
int serve(stlink_t *sl, st_state_t *st);
char* make_memory_map(stlink_t *sl);
-#ifndef __MINGW32__
static void cleanup(int signal __attribute__((unused))) {
if (connected_stlink) {
/* Switch back to mass storage mode before closing. */
exit(1);
}
-#endif
}
connected_stlink = sl;
-#ifndef __MINGW32__
signal(SIGINT, &cleanup);
signal(SIGTERM, &cleanup);
-#endif
if (state.reset) {
stlink_reset(sl);