rofl0r / proxychains-ng

proxychains ng (new generation) - a preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies. continuation of the unmaintained proxychains project. the sf.net page is currently not updated, use releases from github release page instead.
http://sourceforge.net/projects/proxychains-ng/files
GNU General Public License v2.0
9.82k stars 1.08k forks source link

Dl_info is undeclared with uclibc-ng without __USE_GNU #524

Closed fda77 closed 7 months ago

fda77 commented 1 year ago
rofl0r commented 1 year ago

__USE_GNU is an internal macro, most likely set by features.h when _GNU_SOURCE or similar is used. the latter is the macro supposed to be used by the application.

fda77 commented 1 year ago

Thx. I'm not much experienced in this. By add -D_GNU_SOURCE to CFLAGS and removing this patch/pr, compiling also works. Is this the better way? With older proxychains versions this was nothing needed "_GNU_SOURCE" redefined shows for https://github.com/rofl0r/proxychains-ng/blob/master/src/daemon/daemon.c#L8 then

rofl0r commented 1 year ago

it would be best to write a configure check for this, but unconditionally putting _GNU_SOURCE into CFLAGS or before including any header in the file using Dl_info should work too, though the BSDs sometimes become annoying when you enable gnu features.

fda77 commented 1 year ago

Sorry, I can't help writing a configure script, but i can test if it works. Meanwhile i'm using it this way: https://github.com/Freetz-NG/freetz-ng/commit/23cf5e65d95e7f0c1d6d2d05687c6f40a01fefe3

fda77 commented 7 months ago

Sry, that was unexpected and i cant open it again due to missing permissions

rofl0r commented 7 months ago

i can't either but i guess it's OK. uclibc is dying out, but if other users come across this error they should find this via a search engine.

fda77 commented 7 months ago

It died since latest version 1.0.47 of 27.03.2024, 1 week ago? But its okay, im using a local fix

rofl0r commented 7 months ago

15 May 2012, uClibc 0.9.33.2 Released

are you refering to uclibc-ng ?

//edit: oh, it says so even in the PR title

rofl0r commented 7 months ago

@wbx-github maybe uclibc-ng can be made to expose this using the same feature test macros than glibc ?