diff options
author | mi <mi@FreeBSD.org> | 2005-04-13 01:16:21 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2005-04-13 01:16:21 +0800 |
commit | 52bce9b348a995993c9d0dddbde9971a847e11d5 (patch) | |
tree | 0ac36fbb9ea9435c027517d2c6df58dc96665add /devel | |
parent | 67bee191ba079291e916d7d14f5529da5b933ae5 (diff) | |
download | freebsd-ports-gnome-52bce9b348a995993c9d0dddbde9971a847e11d5.tar.gz freebsd-ports-gnome-52bce9b348a995993c9d0dddbde9971a847e11d5.tar.zst freebsd-ports-gnome-52bce9b348a995993c9d0dddbde9971a847e11d5.zip |
Minor/cosmetic changes:
. on BSD use warn(3) instead of static "socket_error",
which is doing the same thing, but poorly;
. use herror(3) instead of "socket_error", when reporting
DNS-related problems;
. patch the test-harness to not fail if our own hostname
is not resolvable -- this is a sign of misconfiguration,
not of the library miscompilation.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/uclmmbase/Makefile | 4 | ||||
-rw-r--r-- | devel/uclmmbase/files/Makefile.bsd | 2 | ||||
-rw-r--r-- | devel/uclmmbase/files/patch-net_udp | 40 | ||||
-rw-r--r-- | devel/uclmmbase/files/patch-test | 11 |
4 files changed, 53 insertions, 4 deletions
diff --git a/devel/uclmmbase/Makefile b/devel/uclmmbase/Makefile index 7c3aafb76558..be31746d0869 100644 --- a/devel/uclmmbase/Makefile +++ b/devel/uclmmbase/Makefile @@ -27,8 +27,8 @@ post-configure: # the networking-error, which may be due IPv6 (or IPv4) being unavailable # or some network (mis)configuration: post-build test: - ${WRKSRC}/tests/test-libcommon | ${AWK} ' \ - /fail/ && $$2 != "networking" { code=1 } \ + ${WRKSRC}/tests/test-libcommon 2>&1 | ${AWK} ' \ + /fail$$/ && $$2 != "networking" { code=1 } \ { print } END { exit code }' do-install: diff --git a/devel/uclmmbase/files/Makefile.bsd b/devel/uclmmbase/files/Makefile.bsd index 8d5ad11d7272..1620e06ab61c 100644 --- a/devel/uclmmbase/files/Makefile.bsd +++ b/devel/uclmmbase/files/Makefile.bsd @@ -1,4 +1,4 @@ -CFLAGS+= -I${OPENSSLINC} +CFLAGS+= -I${OPENSSLINC} -DBSD LDADD = -L${OPENSSLLIB} -lssl -lcrypto VERSION!=cat ${.CURDIR:H}/VERSION LIB = uclmmbase diff --git a/devel/uclmmbase/files/patch-net_udp b/devel/uclmmbase/files/patch-net_udp index 99c4fa6f50be..cd52dd178e40 100644 --- a/devel/uclmmbase/files/patch-net_udp +++ b/devel/uclmmbase/files/patch-net_udp @@ -1,5 +1,5 @@ --- src/net_udp.c Tue Jun 29 12:21:37 2004 -+++ src/net_udp.c Thu Mar 24 13:17:14 2005 ++++ src/net_udp.c Tue Apr 12 13:04:16 2005 @@ -44,7 +44,4 @@ #include "debug.h" #include "memory.h" @@ -8,3 +8,41 @@ -#include "vsnprintf.h" #include "net_udp.h" +@@ -126,4 +123,10 @@ + /*****************************************************************************/ + ++#ifdef BSD ++# define socket_error warn ++#else /* { */ ++# ifdef __FreeBSD__ /* A simple check */ ++# error On FreeBSD BSD should be defined ++# endif + static void + socket_error(const char *msg, ...) +@@ -166,4 +169,5 @@ + #endif + } ++#endif /* } not a BSD system */ + + #ifdef WIN32 +@@ -251,5 +255,5 @@ + return TRUE; + } +- socket_error("Can't resolve IP address for %s", dst); ++ herror(dst); + + return FALSE; +@@ -273,5 +277,5 @@ + struct hostent *h = gethostbyname(addr); + if (h == NULL) { +- socket_error("Can't resolve IP address for %s", addr); ++ herror(addr); + free(s); + return NULL; +@@ -422,5 +426,5 @@ + hent = gethostbyname(hname); + if (hent == NULL) { +- socket_error("Can't resolve IP address for %s", hname); ++ herror(hname); + return NULL; + } diff --git a/devel/uclmmbase/files/patch-test b/devel/uclmmbase/files/patch-test index b1b3e93392a2..0602a47a3f99 100644 --- a/devel/uclmmbase/files/patch-test +++ b/devel/uclmmbase/files/patch-test @@ -7,3 +7,14 @@ +LIBS = -L../src @LIBS@ -L${OPENSSLLIB}/lib -lssl -lcrypto CC = @CC@ +--- tests/test_net_udp.c Sat Oct 28 06:36:08 2000 ++++ tests/test_net_udp.c Tue Apr 12 12:45:44 2005 +@@ -116,4 +116,8 @@ + udp_exit(s1); + ++ if (hname == NULL) { ++ printf("fail: cannot resolve our name\n"); ++ return; ++ } + /**********************************************************************/ + /* Now we send a packet to ourselves via our real network address... */ |