Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-modules_access_directory.c,v 1.1 2015/10/25 11:00:18 wiz Exp $
Mainly due to lack of bits for new fcntl flags, O_DIRECTORY isn't currently
supported by DragonFly's openat. This patch checks which flags are supported
before passing them to vlc_openat.
--- modules/access/directory.c.orig 2014-11-16 18:57:58.000000000 +0000
+++ modules/access/directory.c
@@ -316,8 +316,14 @@ block_t *DirBlock (access_t *p_access)
{
DIR *handle;
#ifdef HAVE_OPENAT
- int fd = vlc_openat (dirfd (current->handle), entry,
- O_RDONLY | O_DIRECTORY);
+ int flags = 0;
+#ifdef O_RDONLY
+ flags |= O_RDONLY;
+#endif
+#ifdef O_DIRECTORY
+ flags |= O_DIRECTORY;
+#endif
+ int fd = vlc_openat (dirfd (current->handle), entry, flags);
if (fd == -1)
{
if (errno == ENOTDIR)