Subject: rtld
To: MacBSD Mailing List <port-mac68k@NetBSD.ORG>
From: David Bushong <dbushong@cory.EECS.Berkeley.EDU>
List: port-mac68k
Date: 05/24/1997 00:01:54
I've been getting some weird share library errors, so I was recompiling
ld.so  I was trying to build the source in /usr/src/gnu/usr.bin/ld/rtld/
and got this warning:

cc -O -fpic -fno-function-cse -DRTLD -DLIBC_SCCS  -I/usr/src/gnu/usr.bin/l
d/rtld/../common -I/usr/src/gnu/usr.bin/ld/rtld/../arch/m68k  -I/usr/src/g
nu/usr.bin/ld/rtld/../common -I/usr/src/gnu/usr.bin/ld/rtld/../arch/m68k 
-Werror  -c rtld.c
cc1: warnings being treated as errors
rtld.c:182: warning: initialization from incompatible pointer type
rtld.c:182: warning: initialization from incompatible pointer type
*** Error code 1

Stop.

It's referring to these line in rtld.c:

static void             *__dlopen __P((const char *, int));
static int              __dlclose __P((void *));
static void             *__dlsym __P((void *, const char *));
static int              __dlctl __P((void *, int, void *));
static void             __dlexit __P((void));

static struct ld_entry  ld_entry = {
        __dlopen, __dlclose, __dlsym, __dlctl, __dlexit
};

Which seem to conflict with these lines in link.h (from the rtld dir):

struct ld_entry {
        void    *(*dlopen) __P((const char *, int));
        int     (*dlclose) __P((void *));
        void    *(*dlsym) __P((void *, const char *));
        int     (*dlctl) __P((void *, int, void *));
        void    (*dlexit) __P((void));
        void    (*dlrsrvd[3]) __P((void));
};

I didn't change this code.. as far as I know, this is how it stands in
-current..  Anyone know what's wrong?  If it's supposed to be that way,
then why does the Makefile .include .bsd.prog.mk, which in the end tacks
-Werror onto the flags?


    _/_/_/_/  _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
     _/   _/ _/   _/ _/   _/  David P. Bushong -- (510) 845-3271         _/
    _/   _/ _/_/_/  _/_/_/   dbushong@cory.eecs.berkeley.edu            _/
   _/   _/ _/      _/   _/  http://www-inst.eecs.berkeley.edu/~dbushong_/
_/_/_/_/_/_/      _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/