summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-03-11 17:35:47 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-03-11 17:35:47 +0000
commit75c211d916152108be7b5ce54513472ec80ba6b8 (patch)
treebc8d119ab5effe68a30e95ec852b79fbc933c922
parentb6c58fbf5223c7a1946011821f6c69866629983f (diff)
downloadgvfs-75c211d916152108be7b5ce54513472ec80ba6b8.tar.gz
OpenBSB portability fixes. Patch from Jasper Lievisse Adriaanse
2008-03-11 Alexander Larsson <alexl@redhat.com> * common/gsysutils.c: * configure.ac: OpenBSB portability fixes. Patch from Jasper Lievisse Adriaanse <jasper@humppa.nl> svn path=/trunk/; revision=1645
-rw-r--r--ChangeLog7
-rw-r--r--common/gsysutils.c19
-rw-r--r--configure.ac2
3 files changed, 19 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e5bd80b..fcc45ebf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-03-11 Alexander Larsson <alexl@redhat.com>
+ * common/gsysutils.c:
+ * configure.ac:
+ OpenBSB portability fixes.
+ Patch from Jasper Lievisse Adriaanse <jasper@humppa.nl>
+
+2008-03-11 Alexander Larsson <alexl@redhat.com>
+
* daemon/gvfsbackendsftp.c (spawn_ssh):
Use GError->message, not GError->msg.
Patch from Jasper Lievisse Adriaanse <jasper@humppa.nl>
diff --git a/common/gsysutils.c b/common/gsysutils.c
index 7a532f43..9dd8afa4 100644
--- a/common/gsysutils.c
+++ b/common/gsysutils.c
@@ -22,6 +22,9 @@
#include <config.h>
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -46,7 +49,7 @@ _g_socket_send_fd (int connection_fd,
int fd)
{
struct msghdr msg;
- struct iovec vec;
+ struct iovec vec[1];
char buf[1] = {'x'};
char ccmsg[CMSG_SPACE (sizeof (fd))];
struct cmsghdr *cmsg;
@@ -55,9 +58,9 @@ _g_socket_send_fd (int connection_fd,
msg.msg_name = NULL;
msg.msg_namelen = 0;
- vec.iov_base = buf;
- vec.iov_len = 1;
- msg.msg_iov = &vec;
+ vec[0].iov_base = buf;
+ vec[0].iov_len = 1;
+ msg.msg_iov = vec;
msg.msg_iovlen = 1;
msg.msg_control = ccmsg;
msg.msg_controllen = sizeof (ccmsg);
@@ -78,17 +81,17 @@ int
_g_socket_receive_fd (int socket_fd)
{
struct msghdr msg;
- struct iovec iov;
+ struct iovec iov[1];
char buf[1];
int rv;
char ccmsg[CMSG_SPACE (sizeof(int))];
struct cmsghdr *cmsg;
- iov.iov_base = buf;
- iov.iov_len = 1;
+ iov[0].iov_base = buf;
+ iov[0].iov_len = 1;
msg.msg_name = 0;
msg.msg_namelen = 0;
- msg.msg_iov = &iov;
+ msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_control = ccmsg;
msg.msg_controllen = sizeof (ccmsg);
diff --git a/configure.ac b/configure.ac
index 4784e69c..e7bf3beb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ dnl ****************************
dnl *** Checks for pty stuff ***
dnl ****************************
-AC_CHECK_HEADERS(sys/un.h stropts.h termios.h utmp.h sys/uio.h)
+AC_CHECK_HEADERS(sys/un.h stropts.h termios.h utmp.h sys/uio.h sys/param.h)
# Check for PTY handling functions.
AC_CHECK_FUNCS(getpt posix_openpt grantpt unlockpt ptsname ptsname_r)