From 207d3c8c16c7cfcab72f08274a875fd5a3260b12 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 2 Dec 2005 20:45:33 +0000 Subject: [PATCH] * kdb5.c (kdb_load_library): Make dbpath_names static, to keep Solaris native compiler happier. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17537 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/ChangeLog | 5 +++++ src/lib/kdb/kdb5.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 16e0a5c2c..ae159d434 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,8 @@ +2005-12-02 Ken Raeburn + + * kdb5.c (kdb_load_library): Make dbpath_names static, to keep + Solaris native compiler happier. + 2005-10-11 Ken Raeburn * Makefile.in (SHLIB_EXPLIBS): Include support library. Don't diff --git a/src/lib/kdb/kdb5.c b/src/lib/kdb/kdb5.c index 67f03e02f..91f4f8ee3 100644 --- a/src/lib/kdb/kdb5.c +++ b/src/lib/kdb/kdb5.c @@ -362,7 +362,12 @@ kdb_load_library(krb5_context kcontext, char *lib_name, db_library * lib) int ndx; void *vftabl_addr; char *err_str = NULL; - const char *const dbpath_names[] = { + /* N.B.: If this is "const" but not "static", the Solaris 10 + native compiler has trouble building the library because of + absolute relocations needed in read-only section ".rodata". + When it's static, it goes into ".picdata", which is + read-write. */ + static const char *const dbpath_names[] = { KDB_MODULE_SECTION, "db_module_dir", NULL, }; char **profpath = NULL; -- 2.26.2