binarycrusader / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Portability problems in libproxy 0.2.3 #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1) 'test STR = STR' is the portable way to check whether strings are 
identical. See 'man 1 test'. 'STR == STR' just happens to work with some 
shells' builtin test.

2) Not all systems have libdl (only Linux and Solaris AFAIK).

3) arpa/inet.h isn't enough for 'struct sockaddr_in(6)', netinet/in.h 
must be included. Again, it just happens to work on some systems like 
Linux because arpa/inet.h just includes netinet/in.h there.

http://www.opengroup.org/onlinepubs/009695399/basedefs/arpa/inet.h.html
http://www.opengroup.org/onlinepubs/009695399/basedefs/netinet/in.h.html

The attached patch fixes these problems. Tested in Debian Linux and 
DragonFly BSD.

Original issue reported on code.google.com by hasso.te...@gmail.com on 12 Mar 2009 at 1:22

Attachments:

GoogleCodeExporter commented 9 years ago
part 3 has (include of netinet/in.h) has been fixed in commit #309.
part 1 has been fixed in commit #310.

for part 2: this has already been addressed in an earlier fix in commit #303 
using
AC_SEARCH_LIBS([dlopen], [dl]).

Please check if current SVN trunk works for you now and re-open in case of 
trouble.

Thank you.

Original comment by dominiqu...@gmail.com on 12 Mar 2009 at 3:46

GoogleCodeExporter commented 9 years ago
The 2. part of the issue is still there - src/bin/Makefile.am still has 
unconditional proxy_LDFLAGS = -ldl line.

Original comment by hasso.te...@gmail.com on 14 Mar 2009 at 4:31

GoogleCodeExporter commented 9 years ago
Thanks for pointing that one out.

Anyhow this one was an error: bin/proxy does not do anything with dlopen() so 
linking
libdl even on Linux is just wrong.

fixed in commit #319.

Original comment by dominiqu...@gmail.com on 16 Mar 2009 at 9:21