Prefer <fcntl.h> over <sys/fcntl.h>.

<fcntl.h> is the name used by POSIX, so we prefer this and only fall back to
<sys/fcntl.h> on non-POSIX systems.  Fixes warnings compiling against musl
libc.

Reported by ncopa.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@531 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2014-11-06 10:44:07 +00:00
parent bb5e9920d2
commit 137fbd9b85
3 changed files with 12 additions and 10 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01]
* Prefer <fcntl.h> over <sys/fcntl.h> (reported by ncopa). (caf)
* Fix overflow in say() when handling a maximum-length client message. (caf)
* Remove WANT_CHAN_NICK_SERV define and include network services commands

View File

@@ -78,13 +78,13 @@ extern char thing_star[4];
# endif /* HAVE_SYS_TIME_H */
#endif /* TIME_WITH_SYS_TIME */
#ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#else
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif /* HAVE_FCNTL_H */
#endif
# ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
# endif
#endif /* HAVE_FCNTL_H */
#include <stdarg.h>
#include <unistd.h>

View File

@@ -62,11 +62,11 @@
/*
* Deal with brokenness in <fcntl.h> and <sys/fcntl.h>
*/
#ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#else
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# ifdef HAVE_SYS_FCNTL_H
# include <sys/fcntl.h>
# endif
#endif