diff options
author | ume <ume@FreeBSD.org> | 2007-01-23 23:19:53 +0800 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2007-01-23 23:19:53 +0800 |
commit | b014c43c7fc77320a2659f97ac58c3304d89d33f (patch) | |
tree | de54c79f4da20908b0a0e54260a99806759c18e5 /dns | |
parent | 507b07004a2bc95efd19cd7f70ed9f7f44b8b83d (diff) | |
download | freebsd-ports-gnome-b014c43c7fc77320a2659f97ac58c3304d89d33f.tar.gz freebsd-ports-gnome-b014c43c7fc77320a2659f97ac58c3304d89d33f.tar.zst freebsd-ports-gnome-b014c43c7fc77320a2659f97ac58c3304d89d33f.zip |
Add WITH_COMPAT5X option. It is to build nss_resinit.so which is able
to work with the 5.X binaries such as p4 on 6.X after importing the
BIND9's resolver.
Requested by: bms
Diffstat (limited to 'dns')
-rw-r--r-- | dns/nss_resinit/Makefile | 7 | ||||
-rw-r--r-- | dns/nss_resinit/files/patch-nss_resinit.c | 22 |
2 files changed, 29 insertions, 0 deletions
diff --git a/dns/nss_resinit/Makefile b/dns/nss_resinit/Makefile index 55ddefe1ae7a..3d5c17acfa08 100644 --- a/dns/nss_resinit/Makefile +++ b/dns/nss_resinit/Makefile @@ -25,4 +25,11 @@ MANCOMPRESSED= yes IGNORE= name-service switch support in libc is required .endif +.if defined(WITH_COMPAT5X) +.if ${OSVERSION} > 700017 +BROKEN= 7.X and later do not have compat syms for the old resolver +.endif +MAKE_ARGS+= CC="${CC} -DWITH_COMPAT5X" +.endif + .include <bsd.port.post.mk> diff --git a/dns/nss_resinit/files/patch-nss_resinit.c b/dns/nss_resinit/files/patch-nss_resinit.c new file mode 100644 index 000000000000..d489b6295fc9 --- /dev/null +++ b/dns/nss_resinit/files/patch-nss_resinit.c @@ -0,0 +1,22 @@ +Index: nss_resinit.c +diff -u -p nss_resinit.c.orig nss_resinit.c +--- nss_resinit.c.orig Wed Apr 12 20:29:35 2006 ++++ nss_resinit.c Tue Jan 23 09:48:22 2007 +@@ -44,6 +44,17 @@ __RCSID("$Mahoroba: src/nss_resinit/nss_ + + #ifndef res_ninit + typedef struct __res_state *res_state; ++#endif ++ ++#ifdef WITH_COMPAT5X ++extern struct __res_state *___res(void); ++#undef _res ++#define _res (*___res()) ++#undef res_ninit ++#undef __res_vinit ++#endif ++ ++#ifndef res_ninit + #define res_ninit(res) res_init() + #define __res_vinit(res, preinit) (res_close(), res_init()) + #endif |