kopia lustrzana https://github.com/stlink-org/stlink
Bind to localhost.
rodzic
db0a8d3ddf
commit
ca668a5a5f
|
@ -13,6 +13,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "gdb-remote.h"
|
||||
#include "stlink-hw.h"
|
||||
|
||||
|
@ -57,7 +58,7 @@ int serve(struct stlink* sl, int port) {
|
|||
|
||||
struct sockaddr_in serv_addr = {0};
|
||||
serv_addr.sin_family = AF_INET;
|
||||
serv_addr.sin_addr.s_addr = INADDR_ANY;
|
||||
serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
|
||||
serv_addr.sin_port = htons(port);
|
||||
|
||||
if(bind(sock, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {
|
||||
|
|
Ładowanie…
Reference in New Issue