Skip to content

Commit

Permalink
Fix issue #87: fails to build on linux headers 3.13
Browse files Browse the repository at this point in the history
Commit 80b1010 added #include <linux/fcntl.h> in
src/accelerometer and friends for builds on uclibc.
This only works with glibc and musl systems with
linux headers 3.9 but fails with linux headers 3.13.

We keep <linux/fcntl.h> but drop <fcntl.h>.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
  • Loading branch information
blueness committed Mar 15, 2014
1 parent ac1546d commit c5a77c7
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/accelerometer/accelerometer.c
Expand Up @@ -50,7 +50,6 @@
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
Expand Down
1 change: 0 additions & 1 deletion src/ata_id/ata_id.c
Expand Up @@ -23,7 +23,6 @@
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
Expand Down
1 change: 0 additions & 1 deletion src/collect/collect.c
Expand Up @@ -24,7 +24,6 @@
#include <stddef.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <getopt.h>
Expand Down
1 change: 0 additions & 1 deletion src/mtd_probe/mtd_probe.c
Expand Up @@ -22,7 +22,6 @@
#include <mtd/mtd-user.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <linux/fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion src/scsi_id/scsi_serial.c
Expand Up @@ -23,7 +23,6 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <syslog.h>
Expand Down

2 comments on commit c5a77c7

@fjaell
Copy link

@fjaell fjaell commented on c5a77c7 Mar 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong to me because we get a lot of new warnings like the following now:

ata_id.c: In function 'main':
ata_id.c:471:9: warning: implicit declaration of function 'open' [-Wimplicit-function-declaration]
fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
^

@blueness
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. I don't know what I was thinking. I'm going to just have to put in the ifdefs for uclibc.

Please sign in to comment.