[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kqueue.c and <sys/file.h>

From: Jeremie Courreges-Anglas
Subject: kqueue.c and <sys/file.h>
Date: Fri, 05 Jan 2018 14:33:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix)


While sys/file.h has been around since some time now, it is not part of
the POSIX standard (or any standard that I know of), and it looks like
most of its consumers really want to include <fcntl.h> instead to access
the various O_* #defines used by open(2).

Within Emacs, src/kqueue.c seems to be the only source file that depends
on sys/file.h to build on OpenBSD.  As discussed with Michael Albinus,
I'd suggest using fcntl.h there (trivial diff below).  I guess it should
be tested on other systems that provide kqueue(2) (*BSD, OSX, ?) but
I don't expect fallout.

diff --git a/src/kqueue.c b/src/kqueue.c
index 69d5269d302..7a4f6a471c4 100644
--- a/src/kqueue.c
+++ b/src/kqueue.c
@@ -24,7 +24,7 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #include <sys/types.h>
 #include <sys/event.h>
 #include <sys/time.h>
-#include <sys/file.h>
+#include <fcntl.h>
 #include "lisp.h"
 #include "keyboard.h"
 #include "process.h"

jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]