# glibc-2.3.6静态编译nss的修正文件 # 时间: 2005-11-29 # 作者: 冲天飞豹(youbest) # Email: youbest@sina.com # 问题描述:在使用glibc-2.3.6静态编译nss时出现编译错误,此补丁可修正该问题。 diff -Nur glibc-2.3.6/Makerules glibc-2.3.6.x/Makerules --- glibc-2.3.6/Makerules 2004-12-15 18:52:39.000000000 +0000 +++ glibc-2.3.6.x/Makerules 2005-11-24 22:27:33.112852616 +0000 @@ -637,7 +637,7 @@ override sources := $(addsuffix .c,\ $(filter-out $(elided-routines),\ - $(routines) $(aux) \ + $(routines) $(static-routines) $(aux) \ $(sysdep_routines))) sysdep_routines := $(sysdep_routines) @@ -649,7 +649,8 @@ # elided for all suffixes except for `.ob'. override objects := $(addprefix $(objpfx),$(sources:.c=.o) \ $(patsubst %,$(bppfx)%.o,\ - $(filter $(routines) $(sysdep_routines),$(bp-thunks)))) + $(filter $(routines) $(static-routines) $(sysdep_routines) $(static-routines),$(bp-thunks)))) +# $(addsuffix .c,$(static-routines)) # The makefile may define $(extra-libs) with `libfoo libbar' diff -Nur glibc-2.3.6/nss/Makefile glibc-2.3.6.x/nss/Makefile --- glibc-2.3.6/nss/Makefile 2002-09-29 18:17:29.000000000 +0000 +++ glibc-2.3.6.x/nss/Makefile 2005-11-24 22:27:31.123155096 +0000 @@ -30,6 +30,8 @@ routines = nsswitch getnssent getnssent_r digits_dots \ $(addsuffix -lookup,$(databases)) +static-routines = $(addprefix files-,$(databases)) + # These are the databases that go through nss dispatch. # Caution: if you add a database here, you must add its real name # in databases.def, too. diff -Nur glibc-2.3.6/resolv/Makefile glibc-2.3.6.x/resolv/Makefile --- glibc-2.3.6/resolv/Makefile 2004-08-15 20:21:59.000000000 +0000 +++ glibc-2.3.6.x/resolv/Makefile 2005-11-24 21:10:15.872820256 +0000 @@ -32,6 +32,14 @@ routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \ res_hconf res_libc res-state +static-routines := dns-host dns-network dns-canon \ + gethnamaddr res_comp res_debug \ + res_data res_mkquery res_query res_send \ + inet_net_ntop inet_net_pton inet_neta base64 \ + ns_parse ns_name ns_netint ns_ttl ns_print \ + ns_samedomain + + tests = tst-aton tst-leaks xtests = tst-leaks2