<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>from manpage:<br></div><div><br></div><div>BUGS<br></div><div>One must check for two different error codes, EISDIR and ENOENT, when trying to determine whether the kernel<br></div><div>supports O_TMPFILE functionality.<br></div><div><br></div><div><br></div><div>On Thu, Jun 13, 2019, at 14:41, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>ENOENT is checked because /tmp might not exist, not because of O_TMPFILE<br></div><div><br></div><div class="qt-gmail_quote"><div>Le 13 juin 2019 19:48:14 GMT+08:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>From man open(2):<br></div><div>EOPNOTSUPP: The filesystem containing pathname does not support O_TMPFILE.<hr> src/linux/filesystem.c | 5 +++--<br></div><div> 1 file changed, 3 insertions(+), 2 deletions(-)<br></div><div><br></div><div>diff --git a/src/linux/filesystem.c b/src/linux/filesystem.c<br></div><div>index caa97fbf3f..3712f4ba06 100644<br></div><div>--- a/src/linux/filesystem.c<br></div><div>+++ b/src/linux/filesystem.c<br></div><div>@@ -45,10 +45,11 @@ int vlc_memfd(void)<br></div><div> <br></div><div> /* Fallback to open with O_TMPFILE, */<br></div><div> fd = open("/tmp", O_RDWR | O_CLOEXEC | O_TMPFILE, S_IRUSR | S_IWUSR);<br></div><div>- if (fd != -1 || (errno != EISDIR && errno != ENOENT))<br></div><div>+ if (fd != -1 || (errno != EISDIR && errno != ENOENT && errno != EOPNOTSUPP))<br></div><div> return fd;<br></div><div> <br></div><div>- /* Fallback to POSIX implementation if O_TMPFILE is not supported */<br></div><div>+ /* Fallback to POSIX implementation if O_TMPFILE is not supported (errno is<br></div><div>+ * EISDIR, ENOENT, or EOPNOTSUPP, cf. man open(2). */<br></div><div> char bufpath[] = "/tmp/"PACKAGE_NAME"XXXXXX";<br></div><div> fd = vlc_mkstemp(bufpath);<br></div><div> if (fd != -1)<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>