summaryrefslogtreecommitdiff
path: root/common
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 /common
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
Diffstat (limited to 'common')
-rw-r--r--common/gsysutils.c19
1 files changed, 11 insertions, 8 deletions
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);