Comments (8)
thanks for your report.
i hope the commit i just made fixes it.
from microsocks.
Unfortunately, I am still getting the same errors
from microsocks.
that is weird, i developed the patch on a glibc system (albeit an ancient one) and it worked there. are you certain you pulled the patch ?
from microsocks.
Yes positive, here is the error, they just shifted down some lines. What OS are you using?
root@kali:~/microsocks# make
cc -Wall -std=c99 -c -o server.o server.c
In file included from server.c:1:0:
server.h:26:59: warning: ‘struct addrinfo’ declared inside parameter list will not be visible outside of this definition or declaration
int resolve(const char *host, unsigned short port, struct addrinfo** addr);
^~~~~~~~
server.c:5:59: warning: ‘struct addrinfo’ declared inside parameter list will not be visible outside of this definition or declaration
int resolve(const char *host, unsigned short port, struct addrinfo** addr) {
^~~~~~~~
server.c:5:5: error: conflicting types for ‘resolve’
int resolve(const char *host, unsigned short port, struct addrinfo** addr) {
^~~~~~~
In file included from server.c:1:0:
server.h:26:5: note: previous declaration of ‘resolve’ was here
int resolve(const char *host, unsigned short port, struct addrinfo** addr);
^~~~~~~
server.c: In function ‘resolve’:
server.c:6:9: error: variable ‘hints’ has initializer but incomplete type
struct addrinfo hints = {
^~~~~~~~
server.c:7:3: error: unknown field ‘ai_family’ specified in initializer
.ai_family = AF_UNSPEC,
^
server.c:8:3: error: unknown field ‘ai_socktype’ specified in initializer
.ai_socktype = SOCK_STREAM,
^
server.c:9:3: error: unknown field ‘ai_flags’ specified in initializer
.ai_flags = AI_PASSIVE,
^
server.c:9:15: error: ‘AI_PASSIVE’ undeclared (first use in this function)
.ai_flags = AI_PASSIVE,
^~~~~~~~~~
server.c:9:15: note: each undeclared identifier is reported only once for each function it appears in
server.c:9:15: warning: excess elements in struct initializer
server.c:9:15: note: (near initialization for ‘hints’)
server.c:6:18: error: storage size of ‘hints’ isn’t known
struct addrinfo hints = {
^~~~~
server.c:13:9: warning: implicit declaration of function ‘getaddrinfo’ [-Wimplicit-function-declaration]
return getaddrinfo(host, port_buf, &hints, addr);
^~~~~~~~~~~
server.c:6:18: warning: unused variable ‘hints’ [-Wunused-variable]
struct addrinfo hints = {
^~~~~
server.c: In function ‘server_setup’:
server.c:23:29: warning: passing argument 3 of ‘resolve’ from incompatible pointer type [-Wincompatible-pointer-types]
if(resolve(listenip, port, &ainfo)) return -1;
^
server.c:5:5: note: expected ‘struct addrinfo **’ but argument is of type ‘struct addrinfo **’
int resolve(const char *host, unsigned short port, struct addrinfo** addr) {
^~~~~~~
server.c:26:25: error: dereferencing pointer to incomplete type ‘struct addrinfo’
for(p = ainfo; p; p = p->ai_next) {
^~
server.c:39:2: warning: implicit declaration of function ‘freeaddrinfo’ [-Wimplicit-function-declaration]
freeaddrinfo(ainfo);
^~~~~~~~~~~~
server.c: In function ‘resolve’:
server.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Makefile:28: recipe for target 'server.o' failed
make: *** [server.o] Error 1
from microsocks.
i'm using sabotage linux based on musl libc.
to help getting this resolved, can you try the following?
echo "CPPFLAGS += -D_XOPEN_SOURCE=700" > config.mak
make
and if that doesn't work either:
echo "CPPFLAGS += -D_GNU_SOURCE" > config.mak
make
from microsocks.
added another commit which should fix it for real (studied glibc git features.h) ^
from microsocks.
and yet another one!
from microsocks.
Hahaha, that seemed to have fixed it! thanks for fixing it so quickly
root@kali:~/microsocks# echo "CPPFLAGS += -D_XOPEN_SOURCE=700" > config.mak
root@kali:~/microsocks# make
cc -D_XOPEN_SOURCE=700 -Wall -std=c99 -c -o server.o server.c
cc -D_XOPEN_SOURCE=700 -Wall -std=c99 -c -o sblist.o sblist.c
sblist.c:8:2: warning: #warning "your C library sucks." [-Wcpp]
#warning "your C library sucks."
^~~~~~~
cc -D_XOPEN_SOURCE=700 -Wall -std=c99 -c -o sblist_delete.o sblist_delete.c
cc sockssrv.o server.o sblist.o sblist_delete.o -lpthread -o microsocks
from microsocks.
Related Issues (20)
- FR: whitelist IP address in parameter HOT 6
- Use custom DNS HOT 20
- Can't connect to `0.0.0.0` on client HOT 4
- Connect to server running on the same machine HOT 17
- microsocks-1.0.2-x86_64-static may contain security issues HOT 1
- EC_TTL_EXPIRED error is sent down idle connection, and treated as application-layer traffic by client
- microsocks: not found HOT 1
- Configuration of the Proxy HOT 1
- Blocking some IPs HOT 1
- Any plans to support UDP? HOT 2
- Allow passthrough of TCP/ip headers HOT 1
- a little Suggest. Change release url to https HOT 1
- Any chance of a new release with -q flag added? HOT 2
- Disconnect logging
- Using 443 Port HOT 1
- buffer overflow detected HOT 6
- Bandwidth testing tools HOT 5
- add systemd service file HOT 3
- Trying IPv6 sockets w/ IPv6 being available but down, leads to connection failures HOT 2
- segmentation fault on alpine & docker HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsocks.