Simplify, syslogd unconditionally includes fcntl.h already

No need to check for SYSV (?) to include fcntl.h since syslogd.c already
includes it unconditionally.  If this turns out to be an actual problem
we should probe for fcntl.h in configure and use #ifdef HAVE_FCNTL_H.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-10-23 10:33:20 +02:00
parent bf6bba3493
commit 97c107262c
2 changed files with 3 additions and 11 deletions

View File

@ -258,16 +258,13 @@
* Remove special treatment of the percent sign.
*/
/* Includes. */
#include "config.h"
#include <errno.h>
#include <getopt.h>
#include <signal.h>
#include <unistd.h>
#ifdef SYSV
#include <fcntl.h>
#else
#include <sys/msgbuf.h>
#endif
#include "klogd.h"
#include "ksyms.h"
#include <paths.h>
@ -277,7 +274,6 @@
#ifndef TESTING
#include "pidfile.h"
#endif
#include "config.h"
#define __LIBRARY__
#include <linux/unistd.h>

View File

@ -106,7 +106,7 @@
* the first hit.
*/
/* Includes. */
#include "config.h"
#include <ctype.h>
#include <errno.h>
#include <malloc.h>
@ -115,11 +115,7 @@
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
#ifdef SYSV
#include <fcntl.h>
#else
#include <sys/msgbuf.h>
#endif
#include "module.h"
#include <linux/version.h>
#include <paths.h>