mirror of https://git.wownero.com/dsc/mxe.git
Merge pull request #1270 from LuaAndC/nonetwork-print-message
nonetwork: print message from replaced functions
This commit is contained in:
commit
3445107583
|
@ -4,33 +4,44 @@
|
|||
// License: MIT
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void print_message() {
|
||||
fprintf(stderr, "Don't use network from MXE build rules!\n");
|
||||
}
|
||||
|
||||
int connect(int sock, const void *addr, unsigned int len) {
|
||||
print_message();
|
||||
errno = 13; // EACCES, Permission denied
|
||||
return -1;
|
||||
}
|
||||
|
||||
void *gethostbyname(const char *name) {
|
||||
print_message();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getaddrinfo(const char *node, const char *service,
|
||||
const void *hints,
|
||||
void **res) {
|
||||
print_message();
|
||||
return -4; // EAI_FAIL
|
||||
}
|
||||
|
||||
void freeaddrinfo(void *res) {
|
||||
print_message();
|
||||
}
|
||||
|
||||
int getnameinfo(const void * sa,
|
||||
unsigned int salen, char * host,
|
||||
unsigned int hostlen, char * serv,
|
||||
unsigned int servlen, int flags) {
|
||||
print_message();
|
||||
return -4; // EAI_FAIL
|
||||
}
|
||||
|
||||
struct hostent *gethostbyaddr(const void *addr, unsigned int len,
|
||||
int type) {
|
||||
print_message();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue