svn commit: samba r23108 - in branches: SAMBA_3_0/source/lib/replace SAMBA_3_0_26/source/lib/replace SAMBA_4_0/source/lib/replace

James Peach jpeach at samba.org
Thu May 24 15:48:58 GMT 2007


On May 24, 2007, at 12:15 AM, obnox at samba.org wrote:

> Author: obnox
> Date: 2007-05-24 07:15:36 +0000 (Thu, 24 May 2007)
> New Revision: 23108
>
> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23108
>
> Log:
> Add defines of RTLD_NOW and RTLD_GLOBAL to replace.h.
> Fixing build of ldb for instance on some systems without dlfcn.h.
>
>
> Modified:
>   branches/SAMBA_3_0/source/lib/replace/replace.h
>   branches/SAMBA_3_0_26/source/lib/replace/replace.h
>   branches/SAMBA_4_0/source/lib/replace/replace.h
>
>
> Changeset:
> Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
> ===================================================================
> --- branches/SAMBA_3_0/source/lib/replace/replace.h	2007-05-24  
> 01:57:02 UTC (rev 23107)
> +++ branches/SAMBA_3_0/source/lib/replace/replace.h	2007-05-24  
> 07:15:36 UTC (rev 23108)
> @@ -111,11 +111,6 @@
> extern int errno;
> #endif
>
> -#if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
> -ssize_t readahead(int fd, off64_t offset, size_t count);
> -#endif
> -
> -
> #ifndef HAVE_STRDUP
> #define strdup rep_strdup
> char *rep_strdup(const char *s);
> @@ -326,6 +321,12 @@
> #ifndef RTLD_LAZY
> #define RTLD_LAZY 0
> #endif
> +#ifndef RTLD_NOW
> +#define RTLD_NOW 0
> +#endif
> +#ifndef RTLD_GLOBAL
> +#define RTLD_GLOBAL 0
> +#endif

Is there any expectation that this is actually going to work? If we  
cabn't figure out the header that these definition live in, then  
making them up isn't necessarily going to help, eg. on AIX RTLD_GLOBAL  
appears to be 0x100. I don't know any system that defines them *all*  
to zero.

If ldb requires these definitions, Id suggest simply disabling shared  
library support in lds unless they are present. That seems safer that  
passing an arbitrary (random?) value into dlopen.

--
James Peach | jpeach at samba.org



More information about the samba-technical mailing list