[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
compile under SUN compiler problems (ITS#2346)
Full_Name: Matthias
Version: 2.1.14
OS: solaris 8
URL:
Submission from: (NULL) (194.39.131.40)
Hi,
openldap 2.1.14 compiles much better under Solaris own compiler, with the this
patch. Otherwise you get the annoying "non-constant initializers" errors with
the SUN compiler.
Kind regards
Matthias
diff -c -r openldap-2.1.14.orig/libraries/libldap/os-local.c
openldap-2.1.14/libraries/libldap/os-local.c
*** openldap-2.1.14.orig/libraries/libldap/os-local.c Sun Feb 9 18:02:18
2003
--- openldap-2.1.14/libraries/libldap/os-local.c Tue Mar 4 05:40:52
2003
***************
*** 165,172 ****
*/
sendcred: {
int fds[2];
! struct iovec iov = {(char *)fds, sizeof(int)};
struct msghdr msg = {0};
if (pipe(fds) == 0) {
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
--- 165,173 ----
*/
sendcred: {
int fds[2];
! struct iovec iov;
struct msghdr msg = {0};
+ memset (&iov, 0, sizeof iov);
if (pipe(fds) == 0) {
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
diff -c -r openldap-2.1.14.orig/libraries/liblutil/getpeereid.c
openldap-2.1.14/libraries/liblutil/getpeereid.c
*** openldap-2.1.14.orig/libraries/liblutil/getpeereid.c Wed Feb 12
20:20
:35 2003
--- openldap-2.1.14/libraries/liblutil/getpeereid.c Tue Mar 4 05:28:19
2003
***************
*** 53,61 ****
}
#elif defined( DO_SENDMSG )
int dummy, fd[2];
! struct iovec iov = {(char *)&dummy, sizeof(dummy)};
struct msghdr msg = {0};
struct stat st;
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_accrights = (char *)fd;
--- 53,62 ----
}
#elif defined( DO_SENDMSG )
int dummy, fd[2];
! struct iovec iov;
struct msghdr msg = {0};
struct stat st;
+ memset (&iov, 0, sizeof iov);
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_accrights = (char *)fd;
diff -c -r openldap-2.1.14.orig/tests/progs/slapd-modrdn.c
openldap-2.1.14/tests/progs/slapd-modrdn.c
*** openldap-2.1.14.orig/tests/progs/slapd-modrdn.c Mon Feb 24 17:22:31
2003
--- openldap-2.1.14/tests/progs/slapd-modrdn.c Tue Mar 4 06:01:29 2003
***************
*** 98,106 ****
LDAP *ld = NULL;
int i;
pid_t pid = getpid();
! char *DNs[2] = { entry, NULL };
char *rdns[2];
DNs[1] = strdup( entry );
/* reverse the RDN, make new DN */
--- 98,108 ----
LDAP *ld = NULL;
int i;
pid_t pid = getpid();
! char *DNs[2];
char *rdns[2];
+ memset (&DNs, 0, sizeof DNs);
+
DNs[1] = strdup( entry );
/* reverse the RDN, make new DN */