mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-23 15:39:28 +07:00
Revisit issue #87: fails to build on linux headers 3.13
Dropping <fcntl.h> in favor of <linux/fcntl.h> is incorrect. Yet uClibc needs O_CLOEXEC from <linux/fcntl.h>. So we re-introduce <fcntl.h> and include <linux/fcntl.h> only on uClibc systems to avoid redefinitions. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
ac73951d24
commit
974354dee5
@ -50,13 +50,17 @@
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <limits.h>
|
||||
#include <linux/limits.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#include <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "libudev.h"
|
||||
#include "libudev-private.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
@ -38,9 +39,12 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/bsg.h>
|
||||
#include <linux/fcntl.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#include <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "libudev.h"
|
||||
#include "libudev-private.h"
|
||||
#include "log.h"
|
||||
|
@ -24,12 +24,16 @@
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#include <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "libudev.h"
|
||||
#include "libudev-private.h"
|
||||
|
@ -22,9 +22,13 @@
|
||||
#include <mtd/mtd-user.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#include <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <syslog.h>
|
||||
@ -32,7 +33,10 @@
|
||||
#include <scsi/sg.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/bsg.h>
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#include <linux/fcntl.h>
|
||||
#endif
|
||||
|
||||
#include "libudev.h"
|
||||
#include "libudev-private.h"
|
||||
|
Loading…
Reference in New Issue
Block a user