[vlc-commits] posix: fix BSD build
Rémi Denis-Courmont
git at videolan.org
Tue Jun 7 20:11:42 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 7 21:11:25 2016 +0300| [f8abd3334ffdac07859eddde14255bab8b0b6ef9] | committer: Rémi Denis-Courmont
posix: fix BSD build
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8abd3334ffdac07859eddde14255bab8b0b6ef9
---
src/posix/filesystem.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c
index 52a39c9..af830ff 100644
--- a/src/posix/filesystem.c
+++ b/src/posix/filesystem.c
@@ -329,8 +329,10 @@ int vlc_socketpair(int pf, int type, int proto, int fds[2], bool nonblock)
# ifdef SO_NOSIGPIPE
if (ret == 0)
{
- setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){ 1 }, sizeof (int));
- setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &(int){ 1 }, sizeof (int));
+ const int val = 1;
+
+ setsockopt(fds[0], SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof (val));
+ setsockopt(fds[1], SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof (val));
}
# endif
#else
More information about the vlc-commits
mailing list