openldap/openldap.patch

Wed, 08 Feb 2012 20:07:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 08 Feb 2012 20:07:00 +0200
changeset 588
300d43423c2e
parent 586
e10b124b2f21
child 777
4e2fe5febd48
permissions
-rw-r--r--

Update version, adapt patch, correct PID writing, correct build on newer
FreeBSD releases, and most importantly introduce new patch to try to
avoid segfault caused by multiple network interfaces with the same (or
no) address. This is common when configuring bridges and tunnels.

     1 Index: include/ac/fdset.h
     2 --- include/ac/fdset.h.orig	2011-11-25 19:52:29.000000000 +0100
     3 +++ include/ac/fdset.h	2011-12-11 14:01:59.000000000 +0100
     4 @@ -22,6 +22,13 @@
     5  #ifndef _AC_FDSET_H
     6  #define _AC_FDSET_H
     8 +#if defined(HAVE_SYS_TYPES_H)
     9 +#include <sys/types.h>
    10 +#endif
    11 +#if defined(HAVE_SYS_SELECT_H)
    12 +#include <sys/select.h>
    13 +#endif
    14 +
    15  #if !defined( OPENLDAP_FD_SETSIZE ) && !defined( FD_SETSIZE )
    16  #  define OPENLDAP_FD_SETSIZE 4096
    17  #endif
    18 Index: include/ldap_int_thread.h
    19 --- include/ldap_int_thread.h.orig	2011-11-25 19:52:29.000000000 +0100
    20 +++ include/ldap_int_thread.h	2011-12-11 14:01:59.000000000 +0100
    21 @@ -110,6 +110,7 @@
    22   *                                 *
    23   ***********************************/
    25 +#define _POSIX_PTHREAD_SEMANTICS
    26  #define PTH_SYSCALL_SOFT 1
    27  #include <pth.h>
    29 Index: libraries/libldap_r/tpool.c
    30 --- libraries/libldap_r/tpool.c.orig	2011-11-25 19:52:29.000000000 +0100
    31 +++ libraries/libldap_r/tpool.c	2011-12-11 14:01:59.000000000 +0100
    32 @@ -968,6 +968,6 @@
    33  {
    34  	ldap_int_thread_userctx_t *ctx = vctx;
    36 -	return ctx->ltu_id;
    37 +	return ctx != NULL ? ctx->ltu_id : 0;
    38  }
    39  #endif /* LDAP_THREAD_HAVE_TPOOL */
    40 Index: libraries/libmdb/mdb.c
    41 --- libraries/libmdb/mdb.c.orig	2011-11-25 19:52:29.000000000 +0100
    42 +++ libraries/libmdb/mdb.c	2011-12-11 14:01:59.000000000 +0100
    43 @@ -198,7 +198,11 @@
    44   * Otherwise compile with the less efficient -DMDB_DSYNC=O_SYNC.
    45   */
    46  #ifndef MDB_DSYNC
    47 -# define MDB_DSYNC	O_DSYNC
    48 +# ifdef O_DSYNC
    49 +#  define MDB_DSYNC O_DSYNC
    50 +# else
    51 +#  define MDB_DSYNC	O_SYNC
    52 +# endif
    53  #endif
    54  #endif
    56 Index: servers/slapd/back-perl/config.c
    57 --- servers/slapd/back-perl/config.c.orig	2011-11-25 19:52:29.000000000 +0100
    58 +++ servers/slapd/back-perl/config.c	2011-12-11 14:02:56.000000000 +0100
    59 @@ -173,6 +173,9 @@
    60  	} else {
    61  		switch( c->type ) {
    62  		case PERL_MODULE:
    63 +			if (c->argc > 2)
    64 +				snprintf( eval_str, EVAL_BUF_SIZE, "require \"%s\";", c->argv[2] );
    65 +			else
    66  			snprintf( eval_str, EVAL_BUF_SIZE, "use %s;", c->argv[1] );
    67  			eval_pv( eval_str, 0 );

mercurial